w2indow server 2019, how to figure virtual ethernet switch connections in hyper-V

Edward Weller 0 Reputation points
2025-08-25T20:53:29.3833333+00:00

on windows server 2019,

how to figure virtual ethernet switch connections

Windows for business | Windows Server | Devices and deployment | Set up, install, or upgrade
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Marcin Policht 54,995 Reputation points MVP Volunteer Moderator
    2025-08-25T21:21:09.83+00:00
    1. Using Hyper-V Manager (GUI)
    2. Open Hyper-V Manager.
    3. In the Actions pane, select Virtual Switch Manager.
    4. This shows all Virtual Switches (External, Internal, Private) on the host.
    5. 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.
    6. 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
    
    1. 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

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.