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,830 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Every once-in-a-while, when you try to add a XenServer host to the System Center Virtual Machine Manager console, it will generate a certificate error, and the XenServer host will not be added to Virtual Machine Manager: If you are experiencing t…
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 show how to push an installation of Backup Exec to an additional server in both 2012 and 2014 versions of the software. Click on the Backup Exec button in the upper left corner. From here, select Installation and Licensing, then I…
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…

911 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

16 Experts available now in Live!

Get 1:1 Help Now