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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

Sometimes drives fill up and we don't know why.  If you don't understand the best way to use the tools available, you may end up being stumped as to why your drive says it's not full when you have no space left!  Here's how you can find out...
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 tutorial will walk an individual through locating and launching the BEUtility application to properly change the service account username and\or password in situation where it may be necessary or where the password has been inadvertently change…
This tutorial will show how to configure a new Backup Exec 2012 server and move an existing database to that server with the use of the BEUtility. Install Backup Exec 2012 on the new server and apply all of the latest hotfixes and service packs. The…

734 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