Powershell: Get all Hyper-V Checkpoints in a cluster (and remove them)

By Antti Hurme 09/11/2018 1 Comment 1 Min Read

Powershell is the way to go if you need to get all your checkpoints in a cluster.

Get-VM -ComputerName (Get-ClusterNode -Cluster h-pool) | Get-VMSnapshot | Select VMName,Name,SnapshotType,CreationTime,ComputerName

Get all VM’s that have a checkpoit

You can filter the results by adding a where clause, for example to get all recovery snapshots left behind by Veeam or any other backup solution.

Get-VM -ComputerName (Get-ClusterNode -Cluster h-pool) | Get-VMSnapshot | Where-Object {$_.SnapshotType -eq “Recovery” } | Select VMName,Name,SnapshotType,CreationTime,ComputerName

Get all checkpoints of type Recovery

And to remove those snapshots, just add Remove-VMSnapshot at the end.

Get-VM -ComputerName (Get-ClusterNode -Cluster h-pool) | Get-VMSnapshot | Where-Object {$_.SnapshotType -eq “Recovery” } | Remove-VMSnapshot

As a side note, why is it remove Get-VMsnapshot which sounds like VMware’s Get-Snapshot while they are checkpoints? I just don’t get Microsoft sometimes….

Written By

Who am I? | Linkedin

View All Articles
1 Comment
  1. Damian says:

    It was legal issue with use that name in the product -> snapshot/checkpoint

Leave a Reply

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

The reCAPTCHA verification period has expired. Please reload the page.

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