I apologize for the very basic question.
How can I get the power status of a VM?
I made several tests but up to now I was unable to find the right syntax...
Regards
marius
This should do it:
Get-VMHost "host" | Get-VM | Where-Object {$_.PowerState -eq "PoweredOn"}
The PowerState is a property that is present in the VirtualMachine object that is returned by the Get-VM cmdlet.
With the Select-Object cmdlet you specify the properties you want to display.
Get-VM | Select Name,PowerState