The first steps to restore your virtual machine are identical to the steps desribed in my previous post.


Add-PSSnapin Microsoft.SystemCenter.VirtualMachineManager
Get-VMMServer -ComputerName “<ComputerName> | out-null


To be able to restore using powershell you need to know your servername and the checkpoint name. The command to restore your checkpoint is ‘get-VMCheckpoint –VM <Server> | where{$_.Name -eq “<CheckPoint name>”} | restore-VMCheckpoint | out-null

The above command will silently restore your virtual machine.


You enter the following if you want to wait till your restore is finished before the script continues.

Write-Host "$ServerName$ServerNumber is restoring to last checkpoint" -foregroundcolor cyan
</span><span style="color: #000000;">$CheckPointStatus = $SelectedVM.MostRecentTask</span><span style="color: #000000;">start-sleep -seconds 3</span>

<span style="color: #000000;">}
until($CheckPointStatus.status -eq "Completed" -and $ -eq "Restore from checkpoint")

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.