How to Monitor Hyper-V Checkpoints with Paessler PRTG (2025 Guide)

Hyper-V checkpoints eating up disk space? Learn how to automate checkpoint monitoring with PRTG and PowerShell in under 15 minutes. Includes ready-to-use script and step-by-step setup guide.

⏱️ Setup time: 15 minutes | 📊 Difficulty: Intermediate | 💾 Requirements: PRTG

Microsoft used to call them snapshots, but starting with Windows Server 2012 R2, the name was changed to checkpoints. Whatever we call them, it’s important to manage them properly and keep full control over them.

What are checkpoints?

For anyone not familiar with snapshots (VMware, XenServer) or checkpoints (Hyper-V), they let you capture and preserve the current state of a virtual machine.

This can be very helpful when deploying system changes or app updates. In case of a failure, we can easily revert to the previous state in a second. Once a checkpoint is no longer needed, it should be deleted. I’ve had countless moments where snapshots or checkpoints truly saved my day.

The Problem

The problem starts when checkpoints are left sitting for too long, taking up valuable disk space, or when they’re mistaken for a proper backup, a big mistake many admins make.

Hyper-V checkpoints are NOT alternative for a backup!

I’ve also experienced this situation during the training courses I deliver and while working with IT teams. Some people simply forget to delete snapshots, and many would agree with the statement that checkpoints are not backups. We’re all human; it’s easy to forget during busy days!

Hyper-V checkpoint tree with 16 accumulated checkpoints

The Solution

One option is to apply policies that automatically delete checkpoints after a certain number of days, although this can be tricky with some hypervisors. The alternative, which I recommend, is to monitor checkpoints on your servers and trigger notifications if they exceed a threshold you consider too high.

Today, I will show you how to monitor your checkpoints using Paessler PRTG. We want to track if a certain number of checkpoints have been created and not deleted. If that happens, PRTG will trigger an alert to the IT admins so they can take action … and delete them!

✍️ I’ve published 50+ Hyper-V tutorials on different tech portals and trained IT professionals worldwide as a Microsoft Certified Trainer. Looking for expert technical content for your blog? Want to promote your services on mine?
LET’S TALK →

You can use this method if you’re already a PRTG user, or you can download the freeware version, which allows monitoring of up to 100 sensors, enough to cover your full Hyper-V server with all critical components.

How To

To successfully monitor the number of checkpoints on your Hyper-V server, there are five small steps you need to follow to set it up completely.

Prerequisites:

  • Installed PRTG
  • WinRM enabled on the Hyper-V Server
# On Hyper-V Server:
Enable-PSRemoting -Force
Enable-NetFirewallRule -DisplayName "Windows Remote Management (HTTP-In)"

1: Prepare the PowerShell script

In the first step, you will create a PowerShell script and store it on the PRTG server so that PRTG can use it to monitor your Hyper-V environment.

Open Notepad++ or any other text editor and copy the following script:

# Monitor Hyper-V Checkpoints for PRTG
# Returns checkpoint count - use PRTG limits to define thresholds
# by tehcwithasmin.com

try {
    $result = Invoke-Command -ComputerName 'FQDN' -ScriptBlock {
        Get-VMSnapshot -VMName * | Measure-Object
    } -ErrorAction Stop
    
    $count = $result.Count
    
    write-host "$count`:OK"
    exit 0
}
catch {
    write-host "0:Error - Cannot connect to Hyper-V server"
    exit 2
}

In the script, you must change the following parameters:

  • ComputerName– Enter the FQDN of your Hyper-V server and keep it within quotation marks (”).
  • -VMName * -This parameter queries the total number of checkpoints on your Hyper-V server for all virtual machines. If you want to monitor a specific VM, define its name in the script (e.g., -VMName dc01.company.local). In this example, dc01.company.local is the name of the virtual machine.

Save the file as HyperV_checkpoints.ps1, and make sure to select All Files under Save as type.

Once your PowerShell script is ready, copy it to your PRTG server in the following location:

C:\Program Files (x86)\PRTG Network Monitor\Custom Sensors\EXE

2. Add the Hyper-V Server in PRTG

In the second step, add your Hyper-V server as a target in PRTG. You can use either its FQDN or IP address.

Add the Hyper-V server

Once added, it’s important to specify the correct Windows credentials in the device properties so that PRTG has administrative rights to query the Hyper-V server using PowerShell.

Add the Hyper-V server credentials to PRTG

3: Add the sensor

In this step, you will add an EXE/Script Sensor to your PRTG device. The EXE/Script sensor runs an executable file (.exe) or a script (batch file, VBScript, PowerShell) on the probe system. This option is available as part of the PRTG API.

During the creation process, configure the following settings:

  • Sensor Name: Enter Hyper-V Checkpoints
  • EXE/Script: Select the HyperV_Checkpoints.ps1 script
  • Parameters: Only if you want to monitor a specific VM.
  • Security Context: Select Use Windows credentials from parent device
  • Channel Name: Enter No of checkpoints
Add and configure the sensor

Once done, click Create. The sensor will display the current number of checkpoints on your Hyper-V server. PRTG will check the Hyper-V server every 60 seconds to see if any checkpoints exist.

In my case, there are 10 checkpoints available on the Hyper-V server.

Check the channel ‘No of checkpoints’

4: Configure thresholds

But what now?

We have a number of checkpoints, and what do we do with them?

How do we define a warning and an error alert?

Well, it’s time to create thresholds that tell the sensor when to enter a Warning state and when to go into an Error state.

So, all you need to do is click on the No of checkpoints channel, select Enable alerting based on limits, and then configure the following:

  • Upper Limit: Enter 10
  • Upper Warning Limit: Enter 5
  • ErrorLimit Message: Enter Critical: Over 10 checkpoints!
  • Warning Limit Message: Enter Warning: Over 5 checkpoints!
Configure warning and error thresholds

Once done, click Apply and then OK.

It was previously showing a green gauge (screenshot Check the channel ‘No of checkpoints’), and now it will change to display green, warning, and error ranges based on your configured thresholds.

In my case, this sensor is in a Warning state because it has between 5 and 10 checkpoints.

Check the sensor gauge to see how it reflects the configured thresholds.

5: Create a notification trigger

We have everything in place, but we’re still missing notification triggers. Essentially, we want PRTG to notify us when a sensor enters a Warning or Error state via email, SMS, ticket, or any other method (fully customizable).

Navigate to the sensor, then go to Notification Triggers. Add a new State Trigger and configure the Warning and Error states as follows:

Configure state notification trigger

Once an alert is generated, PRTG will trigger the notification alerts. Here is an example of the output in the ticketing system, which is assigned to the admin.

PRTG generated a ticket based on the Warning state

Enjoyed this guide or have a question?

I enjoy working with Hyper-V and PRTG.

Share your thoughts or ask for help in the comments below. I read and reply to every message!

Comments (3):

  1. Tony Fantaci

    March 8, 2023 at 15:29

    Hi,
    The script seems to work when there are no snapshots, but when there is at least 1 snapshot, it fails with message ‘Response not well-formed: “( )” (code: PE132)’.

    Tony

    Reply
  2. Tony Fantaci

    March 9, 2023 at 15:23

    I found the issue. Apparently PRTG does not like the “” symbols in the message. I removed them and it worked.

    Reply
    • Jasmin Kahriman

      March 11, 2023 at 09:06

      Hi Tony – Gald to hear it works now. Thank you for sharing a fix with us.

      Reply

Leave a Reply

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

Share via
Copy link