hyper-v_snapshots
This is an old revision of the document!
This is the solution that should be done first before any other solution. Just remove the lingerging backup checkpoint like you would a normal one via PowerShell (attention: check that you have a minimum of free space for the merge to be done without problems):
Get-VMSnapshot -VMName "VMWithLingeringBackupCheckpoint" | Remove-VMSnapshot
Just for the record: This command deletes all checkpoints
Get snapshot count for each VM
To count the number of snapshots/checkpoints for each VM in a Hyper-V host, you can use PowerShell. Here’s a refined version of your script that will do just that:
$vms = Get-VM foreach ($vm in $vms) { $snapshotCount = (Get-VMSnapshot -VMName $vm.Name).Count Write-Output "$($vm.Name): $snapshotCount" }
Explanation:
- Get-VM retrieves all VMs on the host.
- For each VM,
Get-VMSnapshotfetches the snapshots, and.Countgives the number of snapshots. - Finally, it outputs the VM name along with its snapshot count.
hyper-v_snapshots.1727121678.txt.gz · Last modified: 2024/10/17 21:42 (external edit)
