Two weeks ago, VMware released PowerCLI 6.5.1 with big enhancements.
There is no longer need to download and install MSI file. You can now install PowerCLI directly from the PowerShell Gallery. The PowerShell Gallery is the central repository for PowerShell content from which you can find new PowerShell commands. Installing items from the Gallery requires the latest version of the PowerShellGet module which is available in Windows Management Framework (WMF) 5.0.
Another enhancement is that the modules have also been updated to support the PowerShell auto-loading process. It means that we no longer need to load the PowerCLI module into the PowerShell session. When you will use the first cmdlet then the PowerCLI module will be loaded as needed.
- Windows Management Framework 5 or greater is installed
- Uninstall existing versions of PowerCLI
- Close all the PowerShell sessions
Install the PowerCLI module from PowerShell Gallery. Administrator rights might be required to install modules on your machine:
PS > Install-Module -Name VMware.PowerCLI
NuGet provider is required to continue
PowerShellGet requires NuGet provider version '18.104.22.168' or newer to interact with NuGet-based repositories. The NuGet
provider must be available in 'C:\Program Files\PackageManagement\ProviderAssemblies' or
'C:\Users\Nicolas\AppData\Local\PackageManagement\ProviderAssemblies'. You can also install the NuGet provider by
running 'Install-PackageProvider -Name NuGet -MinimumVersion 22.214.171.124 -Force'. Do you want PowerShellGet to install
and import the NuGet provider now?
[Y] Yes [N] No [S] Suspend [?] Help (default is "Y"): Y
You are installing the modules from an untrusted repository. If you trust this repository, change its
InstallationPolicy value by running the Set-PSRepository cmdlet. Are you sure you want to install the modules from
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "N"): Y
You may need to update the module:
PS > Find-Module "VMWare.*" | Update-Module -Verbose
Now, you just have to load the module:
PS > Import-Module VMware.PowerCLI
More information here
If you have non-internet connected servers then you might need to install PowerCLI. Use the Save-Module cmdlet:
PS > Save-Module -Name VMware.PowerCLI -Path <path_to_your_shared_folder>
You could save to a USB drive or network drive or any other storage location.
Thanks for reading! You can follow me on Twitter @PrigentNico