Ensuring the health of your Hyper-V environment is crucial for maintaining performance and availability. Regular health checks can help you proactively identify issues before they escalate. This PowerShell script automates the process of checking the status of your Hyper-V virtual machines, monitoring their resource usage, and generating a health report.
powershell
# Import the Hyper-V module
Import-Module Hyper-V
# Retrieve and select important properties of virtual machines
$vms = Get-VM | Select-Object Name, State, CPUUsage, MemoryAssigned, MemoryDemand
# Display VM health check results in a table format
$vms | Format-Table -AutoSize
# Export VM health check results to a CSV file
$vms | Export-Csv -Path "C:\HyperV_VM_Health_Check_Report.csv" -NoTypeInformationRun it across your fleet
This script runs as-is on a single host. Paste it into ServerEngine to schedule it, run it on a whole server group in parallel, and keep the credentials out of the file — see the scripts documentation and the credential store.
More in Hyper-V
Create a Hyper-V Checkpoint with PowerShell
2026-08-17Delete Old Hyper-V Checkpoints with PowerShell
2026-08-17Start a Hyper-V VM with PowerShell
2026-08-17Shut Down a Hyper-V VM with PowerShell
2026-08-17Efficient Hyper-V VM Status Reporting Script
2025-01-10Hyper-V Virtual Machine Snapshot Management Script
2025-01-10Ready when you are.
Try ServerEngine free for 7 days.