Listing VMs with Snapshots and Filtering

Post date: Jul 22, 2013 5:24:19 PM

This can be done hundreds of ways but here's my way...

Get-VM | Get-Snapshot | where {$_.Name.Contains("snapshot-") -ne "True" -and $_.Name.Contains("Veeam") -ne "True" -and $_.Name.Contains("vdm-initial-") -ne "True"} | select VM,Name,Description,Created,SizeMB | Export-Csv D:\SnapshotsFiltered.csv -NoTypeInformation -UseCulture