Just Another IT Blog

It's time to share some of my experiences, crazy ideas, tips and tricks !!!

Post Page Advertisement [Top]

Now that you understand what’s snapshot and when to use it…what... you don’t know ?!?! check my previous post about it…

So, you are probably wondering what VM on your environment has snapshots, how long they have been there, but if you are like me, that have hundreds of guests on your environment, using snapshot manager is not the best tool for the job.

VMware provides a Windows PowerShell interface to vSphere functionality. The products below offer PowerShell cmdlets for administering vSphere components. With PowerCLI you can create script to help you with several tasks on your environment.

First you need to install PowerCLI, download it here. (I’m assuming you already have PowerShell on your workstation.

Here’s the steps to get a list of VMs with snapshot

- launch vSphere PowerCLI
- connect on your VC. Run: Connect-VIServer –Server “your_VC”
- run: Get-VM | Sort Name | Get-Snapshot | Select VM,Name,Description,Created

there will go:
If you want to export it to CSV file just run:

Get-VM | Sort Name | Get-Snapshot | Select VM,Name,Description,Created | Export-CSV "Your_File_outup"


It’s time for the cleanup …

Bottom Ad [Post Page]