Applies to: Windows Server 2019, Windows Server 2022 and Windows Server 2025, subject to the workload and edition requirements below.
Understand what an external switch changes
An external Hyper-V virtual switch connects virtual network adapters to a selected physical uplink. It lets VMs participate in the attached network according to the upstream switch, VLAN, firewall and address policies. Creating it changes how the host uses that physical adapter, so a brief interruption or a longer management outage is possible if the network configuration is wrong. Treat switch creation as a connectivity change, especially when working over Remote Desktop.
An external switch does not automatically create Internet access, NAT, DHCP or a secure perimeter. Guest addressing and upstream routing still have to exist. An internal switch connects the host and attached VMs without a physical uplink; a private switch connects only VMs on the host. This guide creates a single-uplink external switch and explicitly decides whether the management OS shares that uplink. A Switch Embedded Teaming design requires additional compatible adapters and separate planning.
Record the current network before touching an adapter
Use a reliable console or out-of-band management path and schedule the change. Identify the actual uplink through its interface description, MAC address, link state, IP configuration and physical switch connection. Names such as Ethernet or Ethernet 2 are not sufficient evidence of purpose. On a remotely hosted system, confirm the provider permits additional guest MAC addresses or the required routed networking arrangement.
Get-NetAdapter | Select-Object Name,InterfaceDescription,ifIndex,MacAddress,Status,LinkSpeed
Get-NetIPConfiguration
Get-DnsClientServerAddress
Get-NetRoute -AddressFamily IPv4
Get-VMSwitch
Get-VMNetworkAdapter -ManagementOSSave the approved static IP, subnet, gateway, DNS servers, VLAN and routes outside the host session. Confirm whether another management adapter remains available. If the selected NIC carries iSCSI, cluster or another specialized traffic role, do not repurpose it without reviewing the impact. A switch command should be the last step of a clear network plan, not a way to discover which adapter was important.
Choose management sharing deliberately
AllowManagementOS True creates or retains a host virtual adapter on the switch so the management OS can use the selected uplink. Host IP settings then belong on the management vEthernet adapter, while the physical NIC is bound to the virtual switch. AllowManagementOS False dedicates that uplink to virtual networking and requires another valid management path for the host.
Sharing is common on a small standalone host, but it does not provide bandwidth reservation or physical redundancy by itself. If management and guests use different VLANs, configure their virtual adapters separately. Do not put the same static IP simultaneously on the physical adapter and its vEthernet replacement. Windows may migrate settings during switch creation, but verify the result instead of assuming every route and DNS setting will be preserved exactly.
Before proceeding, agree on the expected host interface name and address, guest VLAN mode and upstream trunk or access-port configuration. A native or untagged VLAN mismatch can disconnect the host even when the physical link remains Up.
Create the external virtual switch
The following example uses an explicitly identified adapter named NIC-Uplink01 and allows the host to share it. Replace that name after checking the inventory. Run it locally through the recovery-capable session and expect networking to be briefly reconfigured. Do not create a switch with an existing name or attach an adapter already used by another switch without reviewing the current design.
Get-NetAdapter -Name 'NIC-Uplink01' -ErrorAction Stop
New-VMSwitch -Name 'External-LAN' -NetAdapterName 'NIC-Uplink01' `
-AllowManagementOS $true
Get-VMSwitch -Name 'External-LAN' | Format-List Name,SwitchType,NetAdapterInterfaceDescription
Get-VMNetworkAdapter -ManagementOSSpecifying NetAdapterName makes this an external switch; SwitchType External is not required for that parameter set. If the command returns an error, inspect whether it created any partial object and check host connectivity before retrying. Do not repeatedly remove and recreate the switch from a disconnected remote session. Changes to an established switch can disconnect every VM that depends on it.
Verify the host virtual adapter and VLAN
Check the management adapter’s actual name, IP configuration and DNS settings. Where the upstream design requires management traffic tagged with VLAN 20, apply the VLAN to the management virtual adapter after confirming its name. Do not copy the sample VLAN ID into a network whose management traffic is intentionally untagged.
Get-NetAdapter -Name 'vEthernet*'
Get-NetIPConfiguration
Get-VMNetworkAdapterVlan -ManagementOS
# Only when the approved management network uses tagged VLAN 20:
Set-VMNetworkAdapterVlan -ManagementOS `
-VMNetworkAdapterName 'External-LAN' -Access -VlanId 20Restore or correct a missing static address only from the recorded plan and console. Verify the default route and DNS registration policy. Multiple default gateways on separate adapters can create asymmetric routing; switch creation is not a reason to add another gateway indiscriminately. Confirm the host can reach its DNS and management services and that administrators can reconnect through the expected interface before attaching production VMs.
Attach one test VM and validate the real path
Select a disposable VM or a specifically approved test adapter. A VM with several network adapters must be addressed by its intended adapter name, not just by VM name. Connect the adapter to the switch and configure its VLAN only if required. The guest must have a valid IP, mask, gateway and DNS configuration for that network.
Connect-VMNetworkAdapter -VMName 'NET-TEST01' -Name 'Network Adapter' `
-SwitchName 'External-LAN'
Get-VMNetworkAdapter -VMName 'NET-TEST01' | Select-Object Name,SwitchName,MacAddress,Status
# Example only for a guest assigned to tagged VLAN 30:
Set-VMNetworkAdapterVlan -VMName 'NET-TEST01' -VMNetworkAdapterName 'Network Adapter' `
-Access -VlanId 30From the guest, test its gateway, DNS resolution and the actual required application port. An unsuccessful ping alone can mean ICMP is blocked; use a service-specific test as well. From another authorized system, verify inbound access if the workload needs it. Check both directions so a working outbound connection does not conceal an upstream rule that blocks the intended service.
Diagnose link, VLAN and provider restrictions separately
If host and guest both fail, inspect the physical link, selected uplink, vSwitch binding, management adapter and upstream port. If the host works but the guest fails, check guest IP configuration, VLAN assignment, firewall and whether the upstream network accepts the guest MAC. In a nested environment, MAC-spoofing permissions or an approved NAT/routed design may be necessary on the outer platform; the inner external switch cannot override those controls.
Do not enable promiscuous behaviour, spoofing or broad firewall exceptions without confirming the supported design. An incorrectly tagged packet and a blocked extra MAC can look similar from inside the guest but require different fixes. Capture the test source, destination, adapter, VLAN and timestamp. Preserve the host’s working management path while adjusting the guest, and avoid changing several layers at once.
Rollback with a reachable management plan
If the new switch causes failure, use the console to compare the actual configuration with the saved baseline. Disconnect or move only the affected test VM adapters as appropriate. Removing External-LAN can return the physical NIC to host use, but it may not reconstruct every former address, DNS setting, route or VLAN. Restore those from the recorded plan and verify management access before ending the maintenance window.
For an established switch, inventory every connected VM and management adapter before removal. A rollback that repairs host RDP but disconnects production VMs is incomplete. Keep the final uplink, MAC policy, VLAN mappings and management-sharing choice documented. Review the design when adding NIC teaming, migration traffic or a second host, since those changes affect the failure and capacity model beyond the single-uplink example.
Related guidance and official references
Install Hyper-V; Create a Generation 2 VM; Troubleshoot network connectivity.