VMware just released PowerCLI 10.0.0. and before you ask; I thought they were just on version 6? I wondered the same and here is the answer: The decision to move to version ten was a marketing choice as the PowerCLI project recently celebrated its 10th birthday.
Let’s get into the how to install or update to the latest
The only pre-requisite is to have PowerShell Core 6.0 installed. This adds support for Mac OS and Linux.
- Get yourself to a powershell prompt with administrative privileges
In my case, I am on Windows 10 and prefer to use PowerShellISE
- Enter the following: Install-Module -Name VMware.PowerCLI -Scope CurrentUser
This will initiate the install of the latest PowerCLI modules.
If you receive a warning, use the -Force comamnd:
“WARNING: Version ‘220.127.116.1177412’ of module ‘VMware.PowerCLI’ is already installed at ‘C:\Users\sysadmin\Documents\WindowsPowerShell\Modules\VMware.PowerCLI\18.104.22.16877412’. To install version ‘10.0.0.7895300’, run Install-Module and add the -Force parameter, this command will install version ‘10.0.0.7895300’ in side-by-side with version ‘22.214.171.12477412’.”
- Next enter: Set-PowerCLIConfiguration -InvalidCertificateAction Ignore
This version of PowerCLI changes the way certificates are handled when connecting to a vCenter server or ESXi host with the Connect-VIServer cmdlet. If your connection endpoint is using an invalid certificate (self-signed or otherwise), PowerCLI would previously return back a warning. The handling has been updated to be more secure and now return back an error.If you are using an invalid certificate, you can correct the error with the ‘Set-PowerCLIConfiguration’ cmdlet. The parameter needing to be configured is ‘InvalidCertificateAction’ and the available settings are Fail, Warn, Ignore, Prompt, and Unset.
For more info ref: https://blogs.vmware.com/PowerCLI