- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
List snapshots older than and only powered on VM
Hi gurus
I want a list of all powered ON vm with snapshot older than 5 days, I have the following but as you can tell still curving some learning
$PowONvm = Get-VM |where {$_.powerstate -eq "PoweredOn"}| Get-Snapshot | Where {$_.Created -lt (Get-Date).AddDays(-5)} |select vm,name,powerstate
This bring powered off and on vm , can someone help on where I went wrong.
Thanks