PowerShell Logo Small

Restore-VMSnapshot



This is the built-in help made by Microsoft for the command 'Restore-VMSnapshot', in PowerShell version 5 - as retrieved from Windows version 'Microsoft Windows Server 2012 R2 Standard' PowerShell help files on 2016-06-23.

For PowerShell version 3 and up, where you have Update-Help, this command was run just before creating the web pages from the help files.

SYNOPSIS

Restores a virtual machine checkpoint.

SYNTAX


Restore-VMSnapshot [-Name] <String> [-VMName] <String> [-AsJob] [-ComputerName <String[]>] [-Passthru] [-Confirm] [-WhatIf] [<CommonParameters>]
Restore-VMSnapshot [-VM] <VirtualMachine> [-AsJob] [-Passthru] -Name <String> [-Confirm] [-WhatIf] [<CommonParameters>]
Restore-VMSnapshot [-VMSnapshot] <VMSnapshot[]> [-AsJob] [-Passthru] [-Confirm] [-WhatIf] [<CommonParameters>]



Search powershellhelp.space

DESCRIPTION


The Restore-VMSnapshot cmdlet restores a virtual machine checkpoint.


Note: In Windows Server 2012 R2, virtual machine snapshots were renamed to virtual machine checkpoints. For clarity, this document will refer to virtual machine snapshots as
checkpoints.



<

RELATED LINKS

Online Version: http://go.microsoft.com/fwlink/?LinkID=306932
Get-VMSnapshot

REMARKS

<

Examples


Example 1

PS C:\>Restore-VMSnapshot –Name 'Base image' –VMName TestVM
Confirm
Are you sure you want to perform this action?
Restore-VMSnapshot will restore checkpoint "Base image".
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help
(default is "Y"): Y



Restores checkpoint Base image of virtual machine TestVM.




Example 2

PS C:\>Get-VM | Foreach-Object { $_ | Get-VMSnapshot | Sort CreationTime | Select -Last 1 | Restore-VMSnapshot -Confirm:$false }



Applies the most recent checkpoint on all virtual machines with no confirmation prompts.