It can be difficult to monitor and assess resources in large Hyper-V environments. This Powershell based script helps you to understand virtualization inventory, capacity and general resource availability in your Standalone or Clustered Hyper-V Environment.


Version History and Change Log

Report Details

You can see an full example report:

Cluster Overview (Applicable on clusters only)

o Physical Resources
  · Node
  · Processor
  · Memory
  · Storage

o Virtual Resources
  · vMachine
  · vProcessor
  · vMemory
  · vStorage

Hyper-V Host Table (Clustered or Standalone)

o Hostname
  · Computer Manufacturer, Model
o Operating System Version
o State
o Uptime
o Domain Name
o Total and Running VM Count
  · Detailed as Clustered and Non-clustered
o Processor Count
  · Logical processor count
  · Physical processor socket count
  · Processor Manufacturer, Model, Ghz
  · Hyper-Threading state for Intel processor (shown as tooltip)
  · Virtual Processors per Logical Processor ratio 
o Physical RAM capacity
  · Used, Free, Total

Disk/Volume Table (Clustered or Local)

o Volume
  · Name (Local Volume, Clustered Volume, Cluster Shared Volume)
  · Label or CSV path (shown as tooltip)
  · Disk name (Physical Disk, Clustered Disk)
  · Total/Allocated/Unallocated physical disk size (shown as tooltip)
o Disk/Volume State
o Usage (Logical Partition, Cluster Volume, Cluster Shared Volume, Quorum, System Volume)
o Owner
o Physical Disk Bus Type
o Volume File System
o Active VHD (storage overcommitment)
o Disk and volume capacity
  · Used, Free, Total

Virtual Machine Table

o Instance
  · VM name
  · Configuration XML path (shown as tooltip)
  · Generation
  · Version
o State
o Uptime
o Owner
o Virtual Processor
  · Counts
o Virtual RAM
  · Startup, Minimum, Maximum, Assigned
o Integration Services
  · State like UpToDate, UpdateRequired, MayBeRequired, NotDetected
  · Version number (shown as tooltip)
o Checkpoint
  · Checkpoint state
  · Checkpoint count (if exists, shown as tooltip)
  · Checkpoint chain (if exists)
o Replica
  · Replication State and Health
  · Primary, Replica and Extended modes
  · Replica Server or Primary Server (shown as tooltip)
  · Replication Frequency (shown as tooltip)
  · Last Replication Time (shown as tooltip) 
o Disk
  · VHD Name
  · VHD File Path (shown as tooltip)
  · Current VHD file size
  · Maximum VHD disk size
  · VHD Type
  · Controller Type
  · VHD fragmentation percent
  · Including pass-trough disks (if exists)
  · Including differencing virtual disk chain (if exists) 
o Network Adapter
  · Device type
  · Connection status
  · Virtual switch name
  · IP address
  · Advanced - MAC Address, MAC Type, DHCP Guard, Raouter Guard, Port Mirroring, Protected Network
o Can detects missing VHD files
o Can detects clustered VM configuration resource problems like offline
o Can detects clustered VM failed state


Hyper-V Targets (Clustered or Standalone)

Script Runtime Operating System (directly on a Hyper-V target or remote Windows operating system)


1) Creates a Hyper-V Cluster report in the working directory.

.\Get-HyperVReport.ps1 -Cluster Hvcluster1

2) Creates a Hyper-V Cluster report that shown only highlighted events and alerts in the working directory.

.\Get-HyperVReport.ps1 -Cluster Hvcluster1 -HighlightsOnly $true

3) Creates one or more standalone Hyper-V Host(s) report in the working directory.

.\Get-HyperVReport.ps1 -VMHost Host1,Host2,Host3

4) Creates a Hyper-V Cluster report and sends it to multiple recipients as attachment without smtp authentication.

.\Get-HyperVReport.ps1 -Cluster Hvcluster1 -SendMail $true -SMTPServer -MailFrom -MailTo,

5) Creates a Hyper-V Cluster report and sends it to multiple recipients as attachment with smtp authentication and TLS/SSL communication. -SMTPServerTLSorSSL is optional and used if forced by the smtp server.

.\Get-HyperVReport.ps1 -Cluster Hvcluster1 -SendMail $true -SMTPServer -SMTPPort 587 -MailFrom -MailFromPassword P@ssw0rd -SMTPServerTLSorSSL $true -MailTo,


        Get-HyperVReport.ps1 (aka Hyper-V Reporting Script) can be used to report Hyper-V Cluster or Standalone environments. 
            o Creates a plain but detailed and user-friendly HTML report which is compatible with all modern browsers. 
            o Has an Overview section which shows momentary cluster resource usage. 
            o Storage Overcommitment (see details below) 
            o Shows alerts in the report for certain situations (utilizations, vm checkpoints, replication status, etc.) 
            o Provides more detailed information via tooltips in the HTML report. (cells with asteriks and highlighted) 
            o Includes a mode that reports only alerts in the Hyper-V environment. (aka HighlightsOnly mode) 
            o Collects information by using standard Hyper-V and Clustering PowerShell cmdlets and custom WMI queries. 
            o Checks and installs required runtime environment prerequisites like Hyper-V and Clustering Powershells. 
            o Can be used directly from command-line or as a scheduled Windows task. 
            o Supports report delivery via e-mail with advanced options. (authentication, TLS/SSL, multiple recipients) 
            o Advanced error handling and logging. (Console messages and log file) 
        Version History: 
            [x] Version 1.5 - 05.March.2015 
            [ ] Version 1.1 - 14.January.2015 
            [ ] Version 1.0 - 06.January.2015 
            o Hyper-V Targets (Clustered or Standalone) 
                * Active Directory domain membership 
                * Supported Operating Systems 
                    - Windows Server 2012 
                    - Windows Server 2012 R2 
                    - Hyper-V Server 2012 
                    - Hyper-V Server 2012 R2 
            o Script Runtime Operating System (directly on a Hyper-V target or remote Windows operating system) 
                * Same or trusted Active Directory domain membership with Hyper-V target 
                * Supported Operating Systems  
                    - Windows Server 2012 
                    - Windows Server 2012 R2 
                    - Windows 8 
                    - Windows 8.1 
                * Windows PowerShell 3.0 or 4.0 (installed by default on supported server operating systems) 
                * Sets the Windows PowerShell execution policy to RemoteSigned or Unrestricted 
                * Hyper-V PowerShell (if not, automatically installed by the Get-HyperVReport.ps1 for server oses) 
                * Failover Clustering PowerShell (if not, automatically installed by the Get-HyperVReport.ps1 for server oses) 
                * The script requires administrative privileges on the target Hyper-V server(s) 
        It can be difficult to monitor and assess resources in large Hyper-V environments. This script helps you to understand virtualization inventory, capacity and general resource availability in your Hyper-V environment.  
        Report details: 
        1) Cluster Overview (Applicable on clusters only): 
            o Pyhsical Resources 
                * Node 
                * Processor 
                * Memory 
                * Storage 
            o Virtual Resources 
                * vMachine 
                * vProcessor 
                * vMemory 
                * vStorage 
        2) Hyper-V Host (Clustered or Standalone): 
            o Hostname 
                * Computer Manufacturer, Model 
            o Operating System Version 
            o State 
            o Uptime 
            o Domain Name 
            o Total and Running VM Count 
                * Detailed as Clustered and Non-clustered 
            o Processor Count 
                * Logical processor count 
                * Physical processor socket count 
                * Processor Manufacturer, Model, Ghz 
                * Hyper-Threading state for Intel processor (shown as tooltip) 
                * Virtual Processors per Logical Processor ratio 
            o Used Physical RAM 
            o Free Physical RAM 
            o Total Physical RAM 
        3) Disk/Volume (Clustered or Standalone): 
            o Name 
                * Volume Name (Local Volume, Clustered Volume, Cluster Shared Volume) 
                * Volume label or CSV path (shown as tooltip) 
                * Disk name (Physical Disk, Clustered Disk) 
                * Total/Allocated/Unallocated physical disk size (shown as tooltip) 
            o Disk/Volume State 
            o Usage (Logical Partition, Cluster Volume, Cluster Shared Volume, Quorum, System Volume, Pass-through, Unassigned) 
            o Owner 
            o Physical Disk Bus Type 
            o Volume File System 
            o Active VHD (Storage Overcommitment) 
            o Used Size 
            o Free Size 
            o Total Size 
        4) Virtual Machine 
            o Name 
                * VM name  
                * Configuration XML path (shown as tooltip) 
                * Generation 
                * Version 
            o State 
            o Uptime 
            o Owner 
                * Owner hostname 
            o Virtual Processor 
                * Count 
            o Virtual RAM 
                * Startup 
                * Minimum (if dynamic memory enabled) 
                * Maximum (if dynamic memory enabled) 
                * Assigned 
            o Integration Services 
                * State like UpToDate, UpdateRequired, MayBeRequired, NotDetected 
                * Version number (shown as tooltip) 
            o Checkpoint 
                * Checkpoint state 
                * Checkpoint count (if exists, shown as tooltip) 
                * Checkpoint chain (if exists) 
            o Replica 
                * Replication State and Health 
                * Primary, Replica and Extended modes 
                * Replica Server or Primary Server (shown as tooltip) 
                * Replication Frequency (shown as tooltip) 
                * Last Replication Time (shown as tooltip) 
            o Disk 
                * VHD Name 
                * VHD File Path (shown as tooltip) 
                * Current VHD file size 
                * Maximum VHD disk size 
                * VHD Type 
                * Controller Type 
                * VHD fragmentation percent 
                * Including pass-through disks (if exists) 
                * Including differencing virtual disk chain (if exists) 
                * Can detects missing VHD files (if exists) 
            o Network Adapter 
                * Device type 
                * Connection status 
                * Virtual switch name 
                * IP address 
                * VLAN ID 
                * Advanced - MAC Address, MAC Type, DHCP Guard, Raouter Guard, Port Mirroring, Protected Network 
            o Can detects missing VHD files 
            o Can detects clustered VM configuration resource problems like offline 
            o Can detects clustered VM failed state 
    .PARAMETER  Cluster 
        A single Hyper-V Cluster name. 
        A single standalone Hyper-V Host name or an array of standalone Hyper-V Host names. 
    .PARAMETER  HighlightsOnly 
        A filtering mode only allows the reporting of highlighted events and alerts. 
    .PARAMETER  ReportFilePath 
        HTML report file path. Script working directory is the default value. 
    .PARAMETER  ReportFileNamePrefix 
        HTML report file name prefix. The default value is "HyperVReport" 
    .PARAMETER SendMail 
        Send e-mail option ($true/$false). The default value is "$fale". 
        Mail server address. 
        Mail server port. The default value is "25". 
    .PARAMETER MailTo 
        A single mail recipient or an array of mail recipients. 
    .PARAMETER MailFrom 
        Mail sender address. 
    .PARAMETER MailFromPassword 
        Mail sender password for SMTP authentication. 
        SMTP TLS/SSL option ($true/$false). The default value is "$fale". 
    .PARAMETER ReportFileNameTimeStamp 
        Adds Timestamp to HTML report file name (The default is $true). If you set it to $false then html report’s filename will not have date and time value and it will always has the same filename. 
        Creates a Hyper-V Cluster report in the working directory. 
        .\Get-HyperVReport.ps1 -Cluster Hvcluster1 
        Creates a Hyper-V Cluster report that shown only highlighted events and alerts in the working directory. 
        .\Get-HyperVReport.ps1 -Cluster Hvcluster1 -HighlightsOnly $true 
        Creates one or more standalone Hyper-V Host(s) report in the working directory. 
        .\Get-HyperVReport.ps1 -VMHost Host1,Host2,Host3 
        Creates a Hyper-V Cluster report with custom file name prefix and saves is to the specified folder. 
        .\Get-HyperVReport.ps1 -Cluster Hvcluster1 -ReportFileNamePrefix HvReport -ReportFilePath c:\tools 
        Creates a Hyper-V Cluster report and sends it to multiple recipients as attachment without smtp authentication. 
        .\Get-HyperVReport.ps1 -Cluster Hvcluster1 -SendMail $true -SMTPServer -MailFrom sender@hyperv.corp -MailTo recepient1@hyperv.corp,recepient2@hyperv.corp 
        Creates a Hyper-V Cluster report and sends it to multiple recipients as attachment with smtp authentication and TLS/SSL communication. -SMTPServerTLSorSSL is optional and used if forced by the smtp server. 
        .\Get-HyperVReport.ps1 -Cluster Hvcluster1 -SendMail $true -SMTPServer -MailFrom sender@hyperv.corp -MailFromPassword P@ssw0rd -SMTPServerTLSorSSL $true -MailTo recepient1@hyperv.corp,recepient2@hyperv.corp 
        Author: Serhat AKINCI 
        Date created: 26.December.2014 
        Last modified: 05.March.2015 
        Version: 1.5