Disable Microsoft Hyper V
Each time I create (or recreate) a virtual machine in Hyper-V using one of my SysPrep'ed images, I usually end up having to do a quick Internet search for:
device manager show hidden devices
Hyper-V is a widely used virtualization software and is used by many system administrators today. One of the major advantages of Hyper-V is that it is free. It comes as a feature with Windows 8/8.1/10 operating systems. When you want to install Hyper-V, you can install this virtualization program on your computer from the Windows features.
I'm a little embarrassed to say that I simply can't remember the environment variable that I need to set in order to remove what I call 'stale' network adapters in Device Manager.
Note that if you don't properly export/import a VM in Hyper-V (and instead simply copy VHDs around like I often do), then you'll end up with a network adapter named something like 'Microsoft Virtual Machine Bus Network Adapter #2' (and a hidden network adapter named 'Microsoft Virtual Machine Bus Network Adapter').
I'm not aware of any issues by not deleting these network adapters, but I still like to clean them up anyway.
Microsoft Hyper V Windows 10
Here is the process that I use to cleanup the network adapters:
- Start an administrator command prompt and then run the following two commands:set devmgr_show_nonpresent_devices=1
start devmgmt.msc
- In the Device Manager window:
- Click the View menu and then click Show hidden devices.
- Expand Network adapters.
- Right-click each network adapter that begins with Microsoft Virtual Machine Bus Network Adapter (e.g. 'Microsoft Virtual Machine Bus Network Adapter', 'Microsoft Virtual Machine Bus Network Adapter #2') and click Uninstall. When prompted to confirm the device uninstall, click OK.
- If you notice any extra Microsoft ISATAP Adapter items, then uninstall those as well. (I occasionally see these, but it doesn't happen all the time like the duplicate VM Bus network adapters.)
- Right-click Network adapters and then click Scan for hardware changes. (This will recreate the default adapter named 'Microsoft Virtual Machine Bus Network Adapter'.)
Disable Hyper-v In Windows10
You should now have exactly one VM Bus network adapter (and one Microsoft ISATAP Adapter).
Turn Off Microsoft Hyper-v
Also, just in case it's not completely obvious, you should do this cleanup before configuring any network settings like DNS servers or a static IP address.
Enable Administrator Account Windows 10
Perhaps if the environment variable was devmgmt_show_hidden_devices (instead of devmgr_show_nonpresent_devices) then I could actually remember it 😉