Skip to main content

Virtual switch

Install Hyper-V and virtual switch

Enable-WindowsOptionalFeature -Online -All -FeatureName Microsoft-Hyper-V

Disable Hyper-V without uninstallation

Ref: BCDEdit /set

bcdedit /set hypervisorlaunchtype { off | auto }

Get current setting

bcdedit /enum "{current}"

Add external virtual switch

$ethernet = Get-NetAdapter -Name "Ethernet"
New-VMSwitch -Name "External Switch" -NetAdapterName $ethernet.Name -AllowManagementOS $true