LucD
Leadership
Leadership

The latest versions don't have any PSSnapin anymore.

If you are on PowerShell 4 or higher, and the PowerCLI modules are installed in one of the default locations (AllUsers or CurrentUser scope), you don't need to load anything anymore.

The module auto-load takes care of loading the required module(s) the first time you use a PowerCLI cmdlet.

See also Welcome PowerCLI to the PowerShell Gallery – Install Process Updates

I would advice to go for PowerShell 5.1 and PowerCLI 10.

You will get the latest PowerCLI version automatically when you run the Install-Module -Name VMware.PowerCLI.

You will have to comment out/remove the Add-PSSnapin lines in your scripts I'm afraid.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos