Skip to content

Latest commit

 

History

History
68 lines (43 loc) · 1.36 KB

PowershellNotes.md

File metadata and controls

68 lines (43 loc) · 1.36 KB

Powershell Notes

Scripts in this repository use Powershell and the VMware PowerCLI plugin. More information about PowerCLI is here: https://developer.broadcom.com/powercli

Basic Check

Version 12.5.0 of PowerCLI has a bug that will break these scripts. Here's how to check to see if it gets fixed:

Connect-VIServer
Get-VsanClusterConfiguration
Disconnect-VIServer

Connect to any vCenter. If the second command works, you are good to go.

Update: this is resoved in version 12.6.0 of PowerCLI

Display All Available Versions

Find-Module -Name VMware.PowerCLI -AllVersions

Install PowerCLI

Install the latest version:

Install-Module -Name VMware.PowerCLI

Install a specific version:

Install-Module -Name VMware.PowerCLI -RequiredVersion 12.0.0.15947286

Update PowerCLI

Update-Module -Name VMware.PowerCLI

Uninstall PowerCLI

Get-Module VMware.* -ListAvailable | Uninstall-Module -Force

Display PowerCLI Version

Get-Module -Name VMware.* -ListAvailable | Select-Object -Property Name,Version

Alow Self-Signed Certificates

Homelab servers typically do not have valid certificates. This will allow PowerCLI to interact with these servers:

Set-PowerCLIConfiguration -Scope User -InvalidCertificateAction Ignore