Useful PowerShell Network Virtualization commands
Examine Network virtualization status using PowerShell
November 23, 2015
![Useful PowerShell Network Virtualization commands Useful PowerShell Network Virtualization commands](https://eu-images.contentstack.com/v3/assets/blt07f68461ccd75245/blt3adf0ad2ab7e6d4b/66181f5f589ad023fb1c4543/powershell-script1_0_2.png?width=850&auto=webp&quality=95&format=jpg&disable=upscale)
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(s)
You May Also Like