How to create Hyper-V virtual switch [Step-by-step guide]

by Tashreef Shareef
Tashreef Shareef
Tashreef Shareef
Windows & Software Expert
Tashreef Shareef is a software developer turned tech writer. He discovered his interest in technology after reading a tech magazine accidentally. Now he writes about everything tech from... read more
Affiliate Disclosure
Configure Hyper-V Virtual switches

Previously we have shown you how to add network adapter to Windows 10 Hyper-V virtual machine.  In this post, we look at how to create Hyper-V Virtual Switch in Windows virtual machines.

Knowing how to create and manage Hyper-V virtual switches is a critical aspect of managing and maintaining your Hyper-V virtual machines. In this article, we will show you all the methods to configure and deploy Hyper-V virtual switches.

Follow the steps in this article to create Hyper-V virtual switches on Windows computers. There are two ways to do this, and we have listed both of them.

How we test, review and rate?

We have worked for the past 6 months on building a new review system on how we produce content. Using it, we have subsequently redone most of our articles to provide actual hands-on expertise on the guides we made.

For more details you can read how we test, review, and rate at WindowsReport.

Steps to create Hyper-V virtual switch

1. Create virtual switch using Hyper-V Manager

  1. Creating virtual switches using the Hyper-V virtual manager is easy. Here is how to configure it.
  2. Open Hyper-V Manager on your Windows computer.
  3. From the right pane click on “Virtual Switch Manager” under Actions. It will open the Virtual Switch Manager wizard.
  4. In the wizard, choose the “New virtual network switch” option.
  5. Next, select the type of virtual switch you want to create. There are three types of the virtual switch which I have explained below.
    Private Virtual Switch – This switch only allows communications between the connected VMs that are connected to the private virtual switch.
    Internal Virtual Switch – This switch only allows communication between virtual adapter connected to connected Virtual Machines and the operating system.
    External Virtual Switch – This switch allows communication outside the host. This is due to the switch being connected to a physical network adapter installed in the Hyper-V.
  6. Select you prefered type of virtual switch and click on Create Virtual Switch button.
  7. Name your new virtual switch.
  8. For Connection Type, select “External Network” and select the network connection from the drop-down menu.
  9. Check “Allow management operating system to share this network adapter” box. These options depend on the virtual switch type selected by the user.
  10. There is an option to enable “VLAN ID” for LAN identification. Leave it unchecked, if you don’t know what it does.
  11. Once done, click on Apply and OK to complete new virtual switch configuration.

How to fix the Hyper-V Error applying hard drive changes

2. Create Hyper-V virtual switch using PowerShell

Configure Hyper v virtual switch

  1. One advantage of using PowerShell to create a virtual switch is the automation it offers in the Hyper-V environment. It also expedites the process by creating virtuals switch with a few commands.
  2. Right-click on “Start” and select Windows PowerShell (admin).
  3. In the PowerShell window, enter the following command and hit enter:
  4. This command will show network adapters. Take note of the names.
  5. External Switch – The following command creates a new External switch. Make sure to replace switch name and network adapter name accordingly.
    New-VMSwitch -name < switch name > -NetAdapterName < network adapter name > -AllowManagementOS $true
  6. Internal Switch – The following command creates a new Internal Switch. Make sure to replace the switch name and network adapter name accordingly.
    New-VMSwitch -name < switch name > -SwitchType Internal
  7. Private Switch – The following command create a new Private Switch. Make sure to change the switch name and network adapter name accordingly.
     New-VMSwitch -name < switch name > -SwitchType Private
  8. Execute any one of the above commands to create Hyper-V virtual switch.


These are the two ways to create Hyper-V virtual switch in Windows virtual environment. Do let us know your thoughts in the comments below.


This article covers:Topics: