I have written more advanced scripts for printing, reporting stuff about snapshots than this one, but here it is just about to see which vm has snapshot. That is all i want by running this command. And i want to see the results FAST!, i mean NOW!, or like YESTERDAY! 😉
[sourcecode language=”powershell”]
Get-View -ViewType VirtualMachine -Filter @{"snapshot" = ""} | select name
[/sourcecode]
bam!
That’s it ;], nothing more. It will just output the vSphere .net view object for vms that have snapshots on it. Once again, it is not fancy, it does not send e-mail, it does not do coffee while running, it just shows you vms with snapshots on it. You can build your own “EXTRA” around this if you want. I just wanted to see very quickly if i have snaps or not. If you have any better idea / quicker how to view snapshots on vm, please post a comment!
