Using the PowerGUI, you can list all snapshots, but unfortunately, it doesn’t list the parent VM.
I wrote a quick little function to search all VMs that have snapshots and list them.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
function get-snaps{ $vms = get-vm | sort name $vmsnaps = @() foreach($vm in $vms){ $snap = Get-Snapshot $vm if($snap){ $vmsnaps += $vm write-host -fore green `n `t $vm $snapshots = Get-Snapshot $vm foreach ($snapshot in $snapshots){ write-host "name: " $snapshot.name " size: " ([math]::Round($snapshot.sizemb/1024,2)) } } } } get-snaps |
Just save that into a .ps1 file and run it. Make sure you’re connected to a vCenter or it won’t work.
Expected output is like this:
Server1
name: Description size: 0.08
Server2
name: Description size: 3.79
Server3
name: Consolidate Helper- 0 size: 1.66
Server4
name: Consolidate Helper- 0 size: 73.45
Server5
name: Consolidate Helper- 0 size: 53.61
Server6
name: asdf size: 0.02