Subscribe to the TST RSS Feed

How to find old vSphere Snapshots using PowerCLI & PowerShell

David Davis

I was watching vExpert and Microsoft MVP Hal Rottenberg’s PowerCLI videos in the new Train Signal vSphere Pro Vol 1 training course. Hal makes so many excellent points in these videos and, even with my years of VMware experience, I have learned a lot from Hal.

One of the many things I learned from Hal is that there are limitations of the GUI interface that can be quickly covered by using PowerCLI. For example, in one of the videos Hal points out how vSphere snapshots can take up a ton of space and, potentially, cause you to run out of disk space in your datastores and, potentially, cause downtime for the your virtual infrastructure.

This is something that you certainly want to avoid but the GUI interface makes it difficult to 1) find which VMs have snapshots and 2) find out how much space these snapshots take up. Seriously, there can be hundreds of gigabytes of diskspace used by snapshots taken months or years ago and you may never know about them.

The cool thing is that “Hal has a script for that”. And the best part is that Hal makes learning PowerCLI and PowerShell fun and easy. Honestly, before I watched this video, I had only used one PowerShell script. After Hal’s excellent teaching on how it works, I am excited about PowerShell and feel like I could write just about any script!

Back to vSphere Snapshots… Hal’s script will go out and find old snapshots in your vSphere infrastructure and report on how old they are and how much space they take up in your datastores. By finding these snapshots early, before they cause trouble, you can delete unneeded snapshots to save space and prevent downtime.

Here’s a sample from Hal’s PowerCLI training video…

 

For more information on what else Hal covers and what else the entire vSphere Pro Vol 1 video covers, visit Train Signal vSphere Pro Vol 1 course outline.

VMware vSphere Training Package


 

Related Posts:

Leave A Comment: