There’s something nice for all you Hyper-V admins out there – don’t know if you’ve seen it already, but Serhat Akinci (my MVP colleague) made a great script for reporting the health of your Hyper-V hosts, called Get-HyperVReport.
You can use it on local or remote Hyper-V hosts and clusters, schedule and e-mail the reports (something to read while enjoying the morning coffee… or tea ), and they look like this:
Highlights (from TechNet page):
- More than 2600+ lines of PowerShell, HTML and CSS code examples
- Creates a plain but detailed and user-friendly HTML report which is compatible with all modern browsers
- Provides more detailed information via tooltips in the HTML report. (cells with asteriks and highlighted)
- Checks and installs required runtime environment prerequisites like Hyper-V and Clustering PowerShell
- Collects information by using standard Hyper-V and Clustering PowerShell cmdlets and custom WMI queries
- Shows alerts in the report for certain situations (utilizations, VM checkpoints, replication status, etc.)
- Can be used directly from command-line or as a scheduled Windows task
- Supports report delivery via e-mail with advanced options. (authentication, TLS/SSL, multiple recipients)
- Includes a mode that reports only alerts in the Hyper-V environment. (aka HighlightsOnly mode)
- Advanced error handling and logging. (Console messages and log file)
Download of this script, and more information about it, is available at TechNet Gallery. And remember – don’t let your Hyper-V hosts run all by themselves!
Cheers!
what if there are multiple clusters ?
Well, you have the -Cluster switch and you can run the script for each of your clusters (you’ll get multiple reports, of course). If that’s not good enough, you can “tweak” this script to include everything you want in a single report…
This script (GetHyperVReport.ps1) is not working in Windows 2022 Hyper-V ….Please send me script that works on windows 2022 Hyper-V.
Or give workaround on this script to work on windows 2022
Hello, you can easily replace the version checks “if (($OsVersion -like “6.2*”) -or ($OsVersion -like “6.3*”))” with “if (($OsVersion -like “6.2*”) -or ($OsVersion -like “6.3*”) -or ($OsVersion -like “10.0*”))” (2 occurrances), and it should work also on Windows Server 2022.
Cheers,
Tom