https://code.vmware.com/docs/7335/powercli-11-0-0-user-s-guide
https://code.vmware.com/docs/7336/cmdlet-reference
Install-Module -Name VMWare.PowerCLI
Set-PowerCLIConfiguration -InvalidCertificateAction Ignore -Confirm:$false
connect-viserver -protocol https –server SERVERNAME
Get-VM | fl | more
Get-VM | where-object {$_.PowerState –eq “PoweredOff”}
Get-VM 〈yourvm〉 | Stop-VMguest
foreach ($var in $vars){
Do something…
}
Get-vm | where-object {$_.MemoryGB –eq 4 } | select -ExpandProperty Name | out-file c:\VMs.txt
$vms = get-content c:\VMs.txt
Foreach-object ($vm in $vms) {
new-networkadapter -vm $vms -NetworkName "〈Port group name〉" -Type "VMXNET3" –startconnected
}