Hyper-V Reporting Script (Powershell & HTML)

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.

4.9 Star
30,929 times
Add to favorites
E-mail Twitter del.icio.us Digg Facebook
  • Report for Windows 2008
    1 Posts | Last post March 16, 2018
    • Can i have the PSCMD for windows 2008 to get full hyper and cluster inventroy
  • New version for Windows server 2016?
    1 Posts | Last post February 22, 2018
    • I have read that with some changes the script can be made compatible with Windows Server 2016 but it does not work totally. I keep getting errors and now cannot make a total report and have to split it in two versions. Is there a version 1.6 comming?
  • Hyper-V target parameter is missing
    1 Posts | Last post January 22, 2018
    • I've ran this script on a host server and I receive a error m essage stating "Hyper-V target parameter is missing". I'm not sure which rows have to be modified for this script to work. Thanks
  • Hyper-V -> W2k16
    2 Posts | Last post January 15, 2018
    • Hi,
      is it possible to change the script and run it on a Windows Server 2016 with Hyper-V installed?
      Kind regards
    • Sorry, found the answer some comments below
  • convert to excel
    1 Posts | Last post December 10, 2017
    • Is there any possibility to convert output html to CSV/xls?
      I need VMname, vCPU, vRAM,IPaddress,VLAN. output data in excel format.
  • Offline Hosts
    2 Posts | Last post November 29, 2017
    • I am learning Powershell, so I don't want how to fix it yet. 
      This script has a problem, when you run against a cluster and one or more nodes of this cluster are down, the HTML report doesn't show it. Someone know how to fix it?
      It is a great script, congratulations. But it needs updates. 
    • just correcting the first line. "so I don't know how to fix it yet". 
  • Task Schedule
    1 Posts | Last post November 17, 2017
    • Hi, 
      can share how to assign with expression value -cluster in task schedule. I tried invoke-command doesn't work, may be my syntax incorrect.
  • Cannot Call a Method Null-Valued Expression
    1 Posts | Last post October 18, 2017
    • I am getting the following error on a 2016 Server.
      You cannot call a method on a null-valued expression.
      At E:\Get-HyperVReport.ps1:3144 char:17
      +                 $physicalDiskName = (($physicalDiskNameData | where{($_.Path).Pa ...
      You cannot call a method on a null-valued expression.
      At E:\Get-HyperVReport.ps1:3161 char:17
      +                 $outPhysicalDiskName = $physicalDiskName.Replace("PHYSICALDRIVE" ...
      I have replaced: Until ($parentPath -eq $null) 
      with: Until (($parentPath -eq $null) -or ($parentPath -eq ""))
      But I believe I am getting a different error then mentioned in the comment a few down.  Any suggestions?  
      Hopefully Serhat AKINCI the author will update the script for 2016 server.  I use it quite extensively for discoveries and information gathering.
      Thank you for the assistance!
  • Running it on 2016 fails to load VMs of other servers
    2 Posts | Last post October 17, 2017
    • I have this running on a 2016 server as a scheduled task. Works on the local VMs. I made the 2016 changes in the comments. However, when connecting to remote servers (some not all) that are a mix of 2016 and 2012r2 I get this in the logs for some...
      The Hyper-V module used in this Windows PowerShell session cannot be used for remote management of the server 'HV1'. Load a compatible version of the Hyper-V module, or use Powershell remoting to connect directly to the remote server. For more information, see http://go.microsoft.com/fwlink/p/?LinkID=532650.
      What sort of changes are needed to make this work? This article (https://www.altaro.com/hyper-v/install-hyper-v-powershell-module/) seems to suggest we would need to modify it to load/unload modules, however, I was hoping for a more elegant solution.
    • I fixed this one myself, in a quick test at least. essentially unloading the PS module, forcing the old version when the newer one fails (eg 2016 server running the script against 2012r2.
      In the block #Generate Data Lines (near line 1350 for me)
      after this line:  $vmHostRunningClusVmCount= 0
      add these 
      remove-module Hyper-V
          import-module Hyper-V
          try {Get-VMHost -ComputerName $vmHostItem}
          catch{"error occurred"}
              if ($error) {
              Remove-Module Hyper-V
              Import-Module Hyper-V -RequiredVersion 1.1
              Get-VMHost -ComputerName $vmHostItem
  • Problem with script
    1 Posts | Last post September 26, 2017
    • I am logged into a VSphere host and running it as Administrator but getting the error below.
      [INFO]    - 13:51:52 - Started! Hyper-V Reporting Script (Version 1.5)
      [INFO]    - 13:51:55 - Logging started: C:\Windows\system32\ScriptLog.txt
      [INFO]    - 13:51:58 - Checking prerequisites to run script on the DC1-xxxxx...
      [WARNING] - 13:51:59 - No valid server for reporting.
      [ERROR]   - 13:51:59 - Script terminated!
      Like I said I am on the host but it is not running.
21 - 30 of 101 Items