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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Scenario:  You do full backups to a internal hard drive in either product (SBS or Server 2008).  All goes well for a very long time.  One day, backups begin to fail with a message that the disk is full.  Your disk contains many, many more backups th…
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…
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles to another domain controller. Log onto the new domain controller with a user account t…
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 …

790 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