10

Basically, this: How to remove all the vEthernet (Default Switch) once and for all?

Except, I removed hyperV and the Containers feature, and all that happened was that the NIC reported as disabled. But it was still there. Then I reinstalled hyperV and it created a second one. Removing HyperV disabled, but did not remove the second one.

I removed it from the registry manually (see third post here: https://social.technet.microsoft.com/Forums/en-US/7f18af6f-4f6b-40ac-94bc-4be32e850fb1/vethernet-default-switch?forum=win10itpronetworking) and that made exactly no difference.

So my question is, short of resetting my laptop, how can I make this stupid thing go away? It's screwing up my networking (auto-switch between WiFi and Ethernet doesn't work anymore)

Edit: for clarification, my end goal, here, is to have (a) Hyper-V removed (uninstalled) and (b) remove the (now unnecessary and unwanted) Hyper-V switches that remained after Hyper-V was uninstalled.

Chris
  • 670

4 Answers4

4
  1. Use the Hyper-V management console or Device Manager aka. devmgmt.msc to remove virtual NIC. Do not remove NIC via registries

  2. You remove virtual switch via PowerShell like it's specified here: https://www.starwindsoftware.com/blog/basic-hyper-v-virtual-nic-management

  3. Also as a workaround, you can try these steps. https://social.technet.microsoft.com/Forums/windows/en-US/e49df568-4f4c-47b7-b30c-952d1e26ca58/cant-remove-failed-virtual-switch-from-hypervs-virtual-switch-manager

A.Newgate
  • 214
2

Despite the down votes, I found a definitive solution. [Note response by Microsoft] My solution works, even with Hyper-V enabled. Many of us don't want to disable Hyper-V security, and nothing else here worked for me on Windows 10 2004, everything is replaced on reboot, even netbios settings which increase attack surface, and its a pain to configure potentially hundreds of adapters every single time. Even automating with Nvspbind all settings revert on reboot. One way to disable these adapters literally ONCE AND FOR ALL is to disable DNScache aka Dns Client service and use a third-party DNS service such as Acrylic , or SimpleDNSCrypt. Be sure to comb through Acrylics configuration with a fine toothed comb because initially your default DNS provider will automatically be set to google or cloudflare. Then point acrylic to your router IP, or preferred DNS server, and set all your adapters DNS settings to 127.0.0.1.

You must disable DNSCache with regedit, here:

Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Dnscache

Set start to 4, and reboot.

The only minor caveat is you may see a single adapter constantly and briefly appearing and disappearing under Control Panel\Network and Internet\Network Connections and your device manager window will constantly refresh each time it attempts to install adapters. This problem appears to have went away for me after I enabled DNSCache (which was already disabled before I initially started using Hyper-V), then disabled it again. Another caveat is that initially loading the windows store you will get an error, unless you have previously opened the store with DNScache enabled. After that the store will work indefinitely unless you reset it. Not a big price to pay given how annoying this is, this actually works.

Tyler
  • 189
0

I've solved it, I think. I deleted all entries under these two keys:

HKLM\SYSTEM\CurrentControlSet\Services\VMSMP\Parameters\NicList HKLM\SYSTEM\CurrentControlSet\Services\VMSMP\Parameters\SwitchList

And rebooted. I should note that this is obviously the nuclear option.

Edit: As mentioned in the comments, device manager probably would have worked too, had I remembered that device manager was a thing.

Chris
  • 670
0

This scheduled task should disable the Hyper-V Default Switch whenever any Switch change occurs:

<?xml version="1.0" encoding="UTF-16"?>
<Task version="1.2" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">
  <RegistrationInfo>
    <Date>2022-05-01T00:00:00.0000000</Date>
    <Author>Hyper-V Default Switch Disabler</Author>
    <URI>\Disable Hyper-V Default Switch</URI>
  </RegistrationInfo>
  <Triggers>
    <BootTrigger>
      <Enabled>true</Enabled>
    </BootTrigger>
    <LogonTrigger>
      <Enabled>true</Enabled>
    </LogonTrigger>
    <EventTrigger>
      <Enabled>true</Enabled>
      <Subscription>&lt;QueryList&gt;&lt;Query Id="0" Path="Microsoft-Windows-Hyper-V-VmSwitch-Operational"&gt;&lt;Select Path="Microsoft-Windows-Hyper-V-VmSwitch-Operational"&gt;*[System[Provider[@Name='Microsoft-Windows-Hyper-V-VmSwitch'] and EventID=220]]&lt;/Select&gt;&lt;/Query&gt;&lt;/QueryList&gt;</Subscription>
    </EventTrigger>
  </Triggers>
  <Principals>
    <Principal id="Author">
      <UserId>S-1-5-18</UserId>
      <RunLevel>HighestAvailable</RunLevel>
    </Principal>
  </Principals>
  <Settings>
    <MultipleInstancesPolicy>Parallel</MultipleInstancesPolicy>
    <DisallowStartIfOnBatteries>false</DisallowStartIfOnBatteries>
    <StopIfGoingOnBatteries>false</StopIfGoingOnBatteries>
    <AllowHardTerminate>true</AllowHardTerminate>
    <StartWhenAvailable>false</StartWhenAvailable>
    <RunOnlyIfNetworkAvailable>false</RunOnlyIfNetworkAvailable>
    <IdleSettings>
      <StopOnIdleEnd>true</StopOnIdleEnd>
      <RestartOnIdle>false</RestartOnIdle>
    </IdleSettings>
    <AllowStartOnDemand>true</AllowStartOnDemand>
    <Enabled>true</Enabled>
    <Hidden>false</Hidden>
    <RunOnlyIfIdle>false</RunOnlyIfIdle>
    <WakeToRun>false</WakeToRun>
    <ExecutionTimeLimit>PT1H</ExecutionTimeLimit>
    <Priority>7</Priority>
  </Settings>
  <Actions Context="Author">
    <Exec>
      <Command>C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe</Command>
      <Arguments>-Command "&amp;{ Disable-NetAdapter -Confirm:$false -Name 'vEthernet (Default Switch)' }"</Arguments>
    </Exec>
  </Actions>
</Task>

I unfortunately don't know how to delete a device via command-line / PowerShell. I know the mapping can be achieved via this:

$(Get-PnpDevice | Where-Object{$_.Name -eq $(Get-NetAdapter -Name 'vEthernet (Default Switch)')[0].InterfaceDescription})[0].InstanceId

Then the InstanceId must be removed from device manager.

Gizmo
  • 1,999