Use this when creating, applying or cleaning up Hyper-V checkpoints by script.
Checkpoints · Hyper-V Automation
Hyper-V checkpoint automation creates, lists, applies and removes checkpoints with Checkpoint-VM, Get-VMSnapshot, Restore-VMSnapshot and Remove-VMSnapshot, cleaning up old ones so AVHDX chains do not grow.
1. Checkpoint automation around changes; clean up automatically.
2. Production checkpoints.
3. Report old checkpoints.
4. Never delete AVHDX files manually.
5. Not backups.
pre-change checkpoint → change → verify → remove
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Common mistakes Narrow the fault
- Leaving checkpoints for weeks (growing AVHDX chains).
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
- Checkpoints are not backups.
- Old checkpoints grow AVHDX chains and slow disks.
- Production checkpoints use VSS inside the guest.
Checkpoint-VM -Name <vm> -SnapshotName pre-change— createGet-VMSnapshot -VMName * | ? CreationTime -lt (Get-Date).AddDays(-3)— old checkpointsRemove-VMSnapshot -VMName <vm> -Name pre-change— delete
ReferenceWhy it matters1 section · depth on demand
What it is
Checkpoints capture VM state; production checkpoints use VSS inside the guest.
ReferenceImportant terms & boundaries2 sections · depth on demand
Example
Checkpoint-VM web01 -SnapshotName pre-patch
Get-VMSnapshot web01
Remove-VMSnapshot web01 -Name pre-patch
How it works
Production checkpoints use VSS/fsfreeze inside the guest for a consistent backup-like state; standard checkpoints also save memory. Each checkpoint creates an AVHDX differencing disk; deleting merges it back into the parent.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Hyper-V Automation > Checkpoints. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://learn.microsoft.com/en-us/powershell/module/hyper-v/?view=windowsserver2025-ps · confidence 94%