This is part 3 of Installing PowershellGet on Windows 7. This time we are going to install PowerCLI latest version from the PowerShell Gallery.
Let’s head to PowershellGallery website, and find the latest stable version for PowerCLI https://www.powershellgallery.com. As of today, version “7736736” is still in beta. So we are going to use “-RequiredVersion” option to download and install the previous, stable, release.
Open the Powershell with elevated ( Administrator level) privileges:
PS C:\> Save-Module -Name VMware.PowerCLI -Path c:\PSRepo -RequiredVersion 22.214.171.12455375
PS C:\> install-module -name VMware.PowerCLI
Note: you might need to press “A” to allow install to proceed, as PSGallery might not be in your trusted list of repositories to download and install modules from:
Ideally, you should now be able to run any PowerCLI cmdlet and it would work as expected.
Note: You must uninstall older ( non-PovershellGallery one) versions of the PowerCLI manually from Programs and Features, and then re-install VMware.PowerCLI via PowershellGet, otherwise they will conflict with the new version, and it will only work partially.
Please, see a nice write-up below in case if the VMware.PowerCLI don not load automatically.