VI Toolkit powershell simple script #3 – Find Snapshots

Caution: Articles written for technical not grammatical accuracy, If poor grammar offends you proceed with caution ;-)

This really isn’t a script but more of a command but I think everyone gets the idea.

Find VM Snapshots for all servers in Virtual Infrastructure and display the VM Name, Snapshot Name, Date Created and power state. You can limit the VM’s this affects by using the location specific commands covered earlier.

Get-snapshot –vm (get-vm) | select vm, name, created, powerstate | export-csv [path_filename_csv]

Nothing to modify except the location and name of the csv file you would like to save the information to.  Go ahead and give it a try you’ll be amazed at what you will find.  I frequently hear “We don’t use snapshots” and then I run this little command and always find a few.  Needless to say this little guy becomes a power tool in the VMware admins arsenal of weapons.

Leave a Reply