This is a how-to article on how to perform VMware PowerCLI installation on Windows. PowerCLI is a module for Windows PowerShell, however, it also supports macOS and Ubuntu running PowerShell Core 6.x.
Step 1. In this example, I’m using Windows 10 Professional. Start typing-in “powershell” and in search results right-click on the Windows PowerShell icon and select Run as Administrator.
Step 2. Validate that the system doesn’t have modules installed. In PowerShell console type in:
Get-Module -ListAvailable -Name VMware*
The cmdlet above displays currently imported and installed (with -ListAvailable) modules which have a name starting with VMware.
Step 3. To perform the installation:
Install-Module -Name VMware.PowerCLI
The prompt will appear with a warning of an untrusted repository. To proceed, type Y and wait for the installation to complete.
Wait for the installation to complete as shown in the screenshot below.
Re-running Get-Module cmdlet from step 1 will now display VMware modules.
Connect to ESXi Host or vCenter
To connect to VMHost use the following command:
In many cases self-signed certificate is used with ESXi and the invalid certificate error will be raised, as shown in the screenshot below.
To get the system prompt for invalid certificates and remove warning about the Customer Experience Improvement Program type in:
Set-PowerCLIConfiguration -Scope User –ParticipateInCeip:$false -InvalidCertificateAction Prompt
To ignore the certificate warning and disable prompts use this variant of command:
Set-PowerCLIConfiguration -Scope User –ParticipateInCeip:$false -InvalidCertificateAction Ignore –Confirm:$false
Now Connect-VIServer will work after the certificate is accepted.
Pre-requisites and useful links
PowerCLI Official Downloads and Documentation page. This page contains other links below and has version switch which leads to documentation for the versions different than 11.5.0.
Compatibility matrix (with pre-requisites):
PowerCLI cmdlet reference:
PowerCLI user guide: