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,915 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 22

Accepted Solution

by:
Syed Mutahir Ali 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Possible fixes for Windows 7 and Windows Server 2008 updating problem. Solutions mentioned are from Microsoft themselves. I started a case with them from our Microsoft Silver Partner option to open a case and get direct support from Microsoft. If s…
This article provides a convenient collection of links to Microsoft provided Security Patches for operating systems that have reached their End of Life support cycle. Included operating systems covered by this article are Windows XP,  Windows Server…
This tutorial will walk an individual through setting the global and backup job media overwrite and protection periods in Backup Exec 2012. Log onto the Backup Exec Central Administration Server. Examine the services. If all or most of them are stop…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Suggested Courses

624 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