Powershell Function to get Hyper-V host networking configuration

This function generates a txt report on one or more Hyper-V hosts’ networking configuration. It’s a useful tool when troubleshooting issues that relate to VM live-migration, VM replication and similar issues. It can be downloaded from the Microsoft Script Center Repository.

To get help for the function type in:

help Get-HVNetworking -full

You will see output similar to:

  Function to get Hyper-V host networking configuration 
  Function generates report in txt format 
  The function will skip computers that don't have Hyper-V role installed 
 .Parameter ComputerName 
  Name(s) of the Hyper-V host(s) to report on 
 .Parameter ReportFile 
  File name to save the resulting report to.  
  Example: "c:\reports\Hyper-V_Networking.txt" 
  If absent, the resulting report is saved to a text file in the current folder. 
  Get-HVNetworking -ComputerName "Host1" 
  This example reports on the Hyper-V host "Host1" 
  Get-HVNetworking "Host1","Host2","Host3" -Verbose 
  This example reports on the Hyper-V hosts "Host1","Host2","Host3" 
  and displays results to the screen as well. 
  Get-ADComputer -Filter * | Select name | foreach-Object { Get-HVNetworking $_.name ".\Domain-HVNetworkingReport.txt" -Verbose } 
  This example goes through all computers in the domain  
  and reports on the ones that have Hyper-V role installled  
  and saves all gathered data into a single report 
  Function by Sam Boutros 
  v1.0 - 08/29/2014 
  Possible future updates: 
    Select specific properties of interest instead of returning all properties 
    Return selected properties as a PSObject  

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.