Thursday, October 14, 2010

Managing Vmware Snapshots – 2/3

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 …

No comments:

Post a Comment

Who am I

My photo
I’m an IT specialist with over 15 years of experience, working from IT infrastructure to management products, troubleshooting and project management skills from medium to large environments. Nowadays I'm working for VMware as a Consulting Architect, helping customers to embrace the Cloud Era and make them successfully on their journey. Despite the fact I'm a VMware employee these postings reflect my own opinion and do not represents VMware's position, strategies or opinions.

Most Viewed Posts

Blog Archive