Solved

How I can generate a report of all VMs that have Checkpoints in System Center Virtual Machine Manager?

Posted on 2010-08-13
3
1,811 Views
Last Modified: 2013-11-08
Greetings -

I would like to generate a report of all the virtual machines I have registered on a System Center Virtual Machine Manager (SCVMM) instance that have Checkpoints.  Hyper-V Checkpoints are not designed to stay around forever or be used as backups so keeping track of what Checkpoints are out there and keeping things clean is a good practice.

I'd like to use Powershell if possible to report for me what VMs have a Checkpoint count above 0.

Let me know if you have any questions or need any clarification.  Thanks!
0
Comment
Question by:amendala
3 Comments
 
LVL 22

Accepted Solution

by:
mutahir earned 500 total points
ID: 33452782
Unmerged snapshots
Forgotten snapshots and checkpoints can occupy valuable disk space. Often these snapshots were created before an application upgrade but then abandoned. I frequently run, the following script to delete and merge these snapshots before they create management and performance problems.

Here's how to find VMs with snapshots:

Get-VM | where {$_.LastRestoredVMCheckpoint -like "* *"} | ft name, LastRestoredVMCheckpoint, hostname

http://searchservervirtualization.techtarget.com/tip/0,289483,sid94_gci1515542,00.html

http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=58e79a68-cea8-4e73-840f-cdd8feb9de87

You can add -Exportcsv in the end to export a csv or  >vmcheckpoints.txt

I haven't exported myself and not near a scvmm at the moment but the command should get you what you are after.
Get-VM | where {$_.LastRestoredVMCheckpoint -like "* *"} | ft name, LastRestoredVMCheckpoint, hostname

Open in new window

0
 
LVL 15

Expert Comment

by:msmamji
ID: 33452998
I am not very good at PS. Try this and see if it works for you.

Regards,
Shahid
Add-PSSnapIn Microsoft.SystemCenter.VirtualMachineManager

$VMMServer = Get-VMMServer -ComputerName "VMMServer01.Mydomain.com"

Get-VM -VMMServer $VMMServer | ForEach-Object {
	$checkpoints = $_.VMCheckpoints
	if ($Checkpoint -gt 0) {
		$_ | Format-list -property Name, Owner, Description, HostName, Operating System, CPUCount, Memory
	}
}

Open in new window

0
 

Author Closing Comment

by:amendala
ID: 33458304
Works perfectly.  Thank you for this and for the link to the site referencing some common SCVMM needs.
0

Featured Post

Do email signature updates give you a headache?

Do you feel like all of your time is spent managing email signatures? Too busy to visit every user’s desk to make updates? Want high-quality HTML signatures on all devices, including on mobiles and Macs? Then, let Exclaimer solve all your email signature problems today!

Join & Write a Comment

I was supporting a handful of Windows 2008 (non-R2) 2 node clusters with shared quorum disks. Some had SQL 2008 installed and some were just a vendor application that we supported. For the purposes of this article it doesn’t really matter which so w…
Nowadays, Virtual Machines are used equally by small and large scale organizations. However the issue is that VMDK files are also prone to corruption. So, in this article we are looking at how to recover VMDK files from hard disk of host operating s…
This tutorial will walk an individual through configuring a drive on a Windows Server 2008 to perform shadow copies in order to quickly recover deleted files and folders. Click on Start and then select Computer to view the available drives on the se…
This tutorial will show how to configure a single USB drive with a separate folder for each day of the week. This will allow each of the backups to be kept separate preventing the previous day’s backup from being overwritten. The USB drive must be s…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now