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 and IT specialist with over 15 years of experience, working from IT infraestructure to management products, troubleshooting and project management skills from medium to large environments. Nowadays I'm working for VMware as a Senior Consultant, helping customers to embrace the Cloud Era and make them succefully on this journay. Despite the fact I'm a VMware employee these postings reflect my own opnion and do not represents VMware's position, strategies or opinios.

Most Viewed Posts

Blog Archive