Useful PowerShell Network Virtualization commands

Examine Network virtualization status using PowerShell

John Savill

November 23, 2015

1 Min Read
Useful PowerShell Network Virtualization commands

Q. What are some useful commands to examine the state of my network virtualization deployment?

A. Below are some of the most useful PowerShell commands I use to check details of my network virtualization environments.

  •  Get-NetVirtualizationProviderAddress - Shows the provider addresses assigned to Hyper-V hosts to enable network virtualization to work. These addresses will not show in a regular IPCONFIG

  • Get-NetVirtualizationLookupRecord | Sort-Object VMName | Format-Table CustomerAddress,VirtualSubnetID,ProviderAddress,VMName -AutoSize  - Shows the mapping of customer addresses (IP inside VMs in a virtual network) to provider addresses (Hyper-V host hosting VM)

  • Get-NetVirtualizationCustomerRoute - View all the virtual subnets and virtual networks a Hyper-V host is part of based on VMs it is hosting

  • Ping -p - Ping a PA of a Hyper-V host to help test connectivity

  • Select-NetVirtualizationNextHop -SourceCustomerAddress 192.168.10.4 -DestinationCustomerAddress 192.168.10.5 -SourceVirtualSubnetID 6864375 - Find the next hop between two VMs in a virtual network

  • Test-VMNetworkAdapter -Sender -SenderIPAddress 192.168.10.4 -ReceiverIPAddress 192.168.11.2 -VMName "Blue-VM-1" -NextHopMacAddress "00508c125f46" -SequenceNumber 100 - Tests the communication between two VMs in a virtual network from the host. Uses the next hop MAC found in the previous command

About the Author

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like