1. You need to start Powershell and set the execution policy to unrestricted to allow the scripts that follow to execute.
2. Load the Hyper-V powershell library if it hasn’t already been done.
3. Now, like I said before, there isn’t a Powershell cmdlet for deleting a virtual switch. So, we will need to create an object reference to the WMI Class “MSVM_VirtualSwitchManagementService” so the switch can be deleted. Use the following syntax.
4. Now, we need to select the virtual switch that we want to delete. There is a powershell cmdlet called Choose-VMSwitch that will allow us to make this selection. The following syntax will provide a list of all the virtual switches that exist on the host and provide the ability to select the switch that is to be deleted. Enter your switch selection by typing the associated ID number from the list and hit enter.
5. Finally, we delete the switch. The final syntax uses the WMI class to delete the virtual switch selected by the powershell cmdlet.
If you now pull up "Hyper-V Manager" and select “Virtual Network Manager”, you will see that the virtual switch has been removed and problem resolved. At this point I was able to replace my failed NIC, create a new virtual switch and bind the new switch to my virtual machines.
I hope this helps!