Press "Enter" to skip to content

Create new virtual switch on Hyper-V with PowerShell

Reading Time: < 1 minute

Get-NetAdapter and find index of the adapter you want to use, you can also pull more details

Get-NetAdapter * | Sort InterfaceDescription | Format-Table -Property Name, InterfaceDescription, MacAddress, Status, ifIndex

$adapter = Get-NetAdapter -InterfaceIndex 17

$name = "name of the swtch"

New-VMSwitch $name -NetAdapterName $adapter.Name -AllowManagementOS $true -Confirm
Share & contribute
Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.