I am getting following compilation issue in Powershell.
Add-PSSnapin : Cannot add Windows PowerShell snap-in
VMware.VimAutomation.Core because it is already added. Verify the name
of the snap-in and try again.
The error clearly mentions that I need to verify the name of the snap-in. It was added successfully when i execute first time itself.
How to verify snap-in exist ,if not then add?
You can load it if it’s not loaded already:
You could also load it anyway and ignore the error: