LucD
Leadership
Leadership

That PowerState is the state the VM was in when the snapshot was taken.
When you want to see the current powerstate you can do

Get-VM | Get-Snapshot |
    where {$_.VM.powerstate -eq "PoweredOn" -and $_.Created -lt (Get-Date).AddDays(-5)} |
    select @{N='VM';E={$_.VM.Name}},Name,@{N='PowerState';E={$_.VM.PowerState}}


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos