Automating vSphere with PowerCLI

PowerCLI by VMWmare is a tried and tested way of scripting management of a vSphere instance using PowerShell. Installing PowerCLI Open a PowerShell terminal as administrator and run the following commands: #Install PowerCLI Install-Module VMware.PowerCLI -AllowClobber -Force #Disable Certificate Verficiation (Don't use this in production) Set-PowerCLIConfiguration -InvalidCertificateAction Ignore -Confirm:$false #Disable CEIP Telemetry Set-PowerCLIConfiguration -Scope User -ParticipateInCEIP:$false #Save vSphere credentials New-VICredentialStoreItem -Host <vSphere FQDN or IP> -User "<username>@domain.com" -Password "<password>" #Test your connection to a vSphere Server Connect-VIServer <vSphere FQDN or IP> Instant Clones An instant clone builds on the advantages of a linked clone by not only sharing common files but also sharing RAM. It’s also parentless too so it’ll still work if the parent VM is deleted. ...

31 July, 2020 · 6 min · 1142 words · JD