PowerCLI: Delete all snapshots by name
I have the issue that we use a cloud automation software, which for whatever reason failed to delete the hypervisor snapshots. Now I was looking into a quick way to delete all those 520 snapshots with PowerCLI, and I found something pretty quick. Based on that, I came up with my own quick PowerCLI one-liner, that’ll list all VMs and their snapshots: 1 Get-VM | Get-Snapshot | Where { $_.Name -like "201502*" } | Format-Table -Property VM, Name, Created, Description, SizeMB -AutoSize Now, I could use another one-liner to delete all snapshots, that’ll look like this: ...