- Using Hyper-V Manager (GUI)
- Open Hyper-V Manager.
- In the Actions pane, select Virtual Switch Manager.
- This shows all Virtual Switches (External, Internal, Private) on the host.
- To see which VM is connected to which switch:
- Select a VM in Hyper-V Manager.
- Click Settings…
- Go to Network Adapter → check the Virtual Switch it’s connected to.
- Using PowerShell (CLI)
PowerShell gives a faster, scriptable way to check all connections.
List all virtual switches
Get-VMSwitch
-
Name
: Switch name -
SwitchType
: External/Internal/Private -
NetAdapterInterfaceDescription
: Shows which physical NIC (for External switches) is used
List VMs and their connected switches
Get-VM | ForEach-Object {
$vm = $_
$vm.NetworkAdapters | ForEach-Object {
[PSCustomObject]@{
VMName = $vm.Name
AdapterName = $_.Name
SwitchName = $_.SwitchName
}
}
}
- This outputs each VM, its network adapter, and the virtual switch it is connected to.
Check which VMs are using a specific switch
Get-VM | Get-VMNetworkAdapter | Where-Object {$_.SwitchName -eq "YourSwitchName"} | Select VMName, Name, SwitchName
- Mapping Virtual to Physical NICs
For External switches, you may want to know which physical NIC is bound:
Get-VMSwitch | Select Name, SwitchType, NetAdapterInterfaceDescription
- This shows which physical NIC the external switch is using.
- Internal switches don’t bind to a physical NIC.
- Private switches exist only inside Hyper-V host, no external connectivity.
If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.
hth
Marcin