How to Create and Delete Hyper-V Checkpoints / Snapshots
Checkpoints (see this article for a definition) can be useful for short-term testing when you need a quick way to revert a Hyper-V virtual machine to its prior state, for example, before updating Windows or installing software.
To create and delete checkpoints (aka. snapshots in older versions of Windows Server and Hyper-V), you can issue the following commands from the command line.
To run the commands you’ll need to invoke PowerShell, which resides in the folder:
%systemdrive%\Windows\System32\WindowsPowerShell\v1.0
The scripts below are ready to copy and paste to your batch files (or into BackupChain if need be), for whatever purpose you need them:
Creating Hyper-V Checkpoints / Snapshots
The actual PowerShell command for creating a checkpoint is:
Checkpoint-VM -Name w7 -SnapshotName WorkingSystem
Where “w7” is the virtual machine name and “WorkingSystem” is the desired checkpoint name.
To package the whole thing into a one-liner that can be launched from the command prompt, or from inside a batch file, we invoke PowerShell as follows:
%systemdrive%\Windows\System32\WindowsPowerShell\v1.0\powershell -command "Checkpoint-VM -Name w7 -SnapshotName testsnapshotname"
In order to remotely create a checkpoint for VM “w7” on server “MyHyperVHostName”, we can run the command as follows:
%systemdrive%\Windows\System32\WindowsPowerShell\v1.0\powershell -command "Get-VM W7 –ComputerName MyHyperVHostName | Checkpoint-VM"
Deleting Hyper-V Checkpoints / Snapshots
The command to delete Hyper-V checkpoints is similar but offers more options:
%systemdrive%\Windows\System32\WindowsPowerShell\v1.0\powershell -command "Get-VM w7 | Remove-VMSnapshot –Name testsnapshotname"
Other variations are possible, too, such as deleting all checkpoints whose names begin with a certain phrase:
%systemdrive%\Windows\System32\WindowsPowerShell\v1.0\powershell -command "Get-VM w7 | Remove-VMSnapshot –Name OldSnapshotName*"
And even slicker is the following command, which deletes snapshots of a certain age, here 30 days:
%systemdrive%\Windows\System32\WindowsPowerShell\v1.0\powershell -command "Get-VMSnapshot -VMName w7| Where-Object {$_.CreationTime -lt (Get-Date).AddDays(-30) } | Remove-VMSnapshot"
Backing up VMs with Checkpoints in Hyper-V
As mentioned by Microsoft, when it comes to Hyper V backup, “Checkpoints Are Not Intended for Backup”: (https://technet.microsoft.com/en-us/library/Cc956044.aspx)
In order to have your important Hyper-V VMs backed up and protected, use BackupChain Backup Software. It handles and restores checkpoints automatically, and VMs may also be restored as clones, side-by-side with the original VM without interference.
You may also be interested in
Hyper-V NAS Backup on Synology, Qnap, Netgear, Drobo, Buffalo
Hyper-V Fixed Disk Backup Considerations
Hyper-V Backup Pass-through Disk Considerations
Dynamic Disk Hyper-V Backup Considerations
Backup Software Overview
BackupChain Server Backup SoftwareDownload BackupChain
Cloud Backup
Backup VMware Workstation
Backup FTP
Backup VirtualBox
Backup File Server
Hyper-V Backup
Backup Hyper-VPopular
- Hyper-V Links, Guides, Tutorials & Comparisons
- Veeam Alternative
- How to Back up Cluster Shared Volumes
- DriveMaker: Map FTP, SFTP, S3 Site to a Drive Letter (Freeware)
Resources
- Free Hyper-V Server
- Remote Desktop Services Blog
- SCDPM Blog
- SCOM Blog
- V4 Articles
- Knowledge Base
- FAQ
- Sitemap
- Backup Education
- Archive 2024
- Archive 2022
- Archive 2021
- Archive 2020
- Archive 2018
- Archive 2017
- Archive 2016
- Archive 2015
- Archive 2014
- Archive 2013
- Hyper-V Scripts in PowerShell
- FastNeuron
- BackupChain (Greek)
- BackupChain (Deutsch)
- BackupChain (Spanish)
- BackupChain (French)
- BackupChain (Dutch)
- BackupChain (Italian)
Backup Software List
BackupChain
Veeam
Unitrends
Symantec Backup Exec
BackupAssist
Acronis
Zetta
Altaro
Windows Server Backup
Microsoft DPM
Ahsay
CommVault
IBM
Other Backup How-To Guides
- Windows Server 2025 Direct ISO Download Link
- New: Backup Software Comparison and List
- Guidelines for Installing Microsoft Exchange 2013 in Hyper-V
- How to fix error CLSID {463948d2-035d-4d1d-9bfc-473fece07dab} Access Denied
- How to Shut Down a Hyper-V Virtual Machine
- Hyper-V on RAID is Slow…Why?
- Granular Backup Software for Hyper-V
- 0x800705aa How to Fix ERROR NO SYSTEM RESOURCES
- How to Backup a Hyper-V VM Remotely Online
- Freeware Backup Software–Watch Out!
- Helpful Hyper-V Links
- How to fix ‘Microsoft Hyper-V VSS Writer’ is in failed state, Writer Failure code: 0x800423f3
- Hyper-V Server 2008 R2: Important Hotfixes and Updates
- Current Windows Server 2012 Updates and Hotfixes
- Veeam Alternative for Hyper-V Backup
- Best Free Network Attached Storage for Files, Hyper-V, and Backups
- Download Links for Windows 10 & Windows Server Technical Preview
- File Server Backup Software for Windows
- Windows 11 Hyper-V Backup, Step-by-Step
- Incremental Backup vs. Differential Backup