Install
PowerShell and VMware PowerCLI on macOS
Install Powershell on Mac
brew cask install
powershell
Now, to launch a PowerShell session in macOS, enter the
following in terminal.
pwsh
Set Repository for Find Vmware module
Set-PSRepository
-Name "PSGallery" -InstallationPolicy "Trusted"
Find Vmware module
Find-Module
"VMware.PowerCLI" | Install-Module -Scope "CurrentUser"
-AllowClobber
Install Vmware PowerCLI
Get-Module
"VMware.PowerCLI" -ListAvailable | FT -Autosize
And if you’d like to see all of the VMware installed
modules, run the following.
Get-Module
"VMware.*" -ListAvailable | FT -Autosize
As new versions of VMware.PowerCLI is released, you can run
the following command to update it.
Update-Module
"VMware.PowerCLI"
Let’s test connecting to vCenter server…
Connect-VIServer
-Server "<Server_Name>"
To bypass this, enter the following command and then enter
“Y” when prompted. This will set the
parameter for the current user.
Set-PowerCLIConfiguration
-InvalidCertificateAction "Ignore"