Article : vmware_powercli

start powercli as Administrator:

Install-Module -Name VMware.PowerCLI
Get-Module -ListAvailable -Name VMware*
Set-PowerCLIConfiguration -InvalidCertificateAction Ignore
connect-viserver
get-vm

Get-VM | Where-Object {$_.powerstate -eq 'PoweredOn'}
Get-vmhost HOST* | Get-VM | Where-Object {$_.powerstate -eq 'PoweredOn'}