- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The object returned by Get-Snapshot contains a property named VM, under which you find the same object that is returned by Get-VM.
So you could do
Get-VM | Get-Snapshot |
where {$_.VM.powerstate -eq "PoweredOn" -and $_.Created -lt (Get-Date).AddDays(-5)} |
select vm,name,powerstate
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference