Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 7 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save Ashwinning/7af32ac5653b786a12cf57b936098c8e to your computer and use it in GitHub Desktop.
Save Ashwinning/7af32ac5653b786a12cf57b936098c8e to your computer and use it in GitHub Desktop.
How to disable wifi microsoft virtual wifi adapter.

How to disable Microsoft WiFi Direct Virtual Adapter


**I think ** this is how it worked

As Admin

netsh wlan stop hostednetwork

Then stop the service

netsh wlan set hostednetwork mode=disallow

To turn it back on:

netsh wlan set hostednetwork mode=allow 

then

netsh wlan start hostednetwork

WHY?

  • I'm using an Edimax n150 usb WiFi adapter.
  • When I connect to the internet, It would either say Connected or say Connected, No Internet but I couldn't use the internet.
  • On Disabling and Enabling the WiFi connection from Network Connections (ncpa.cpl), the internet would actually work for like 2 seconds.
  • Turns out something was starting A Microsoft WiFi Direct Virtual Adapter.
  • On connecting to the internet I was able to ping stuff successfully, but as soon as the WiFi Direct Virtual Adapter was spawned, the internet would stop working, and I wouldn't even be able to ping by router (default gateway).
  • The picture below is how the spammed Virtual Adapters look in my Device Manager.
    Some of them are disabled (I disabled them manually during the course of debugging), others are hidden (the faded ones). Microsoft Wifi Direct Virtual Adapters
  • The following is what the relevant parts of running ipconfig /all would show.
  • Note how in the Wireless LAN adapter Local Area Connection (The Microsoft WiFi Direct Virtual Adapter), the DHCP Enabled was set to NO, and the Default Gateway was empty.
  • I tried enabling DHCP on the virtual adapter manually, to no avail.

  • I haven't tried tracing down the problem to what was starting this Virtual Adapter. It could be anything, windows, docker, VMWare, John Cena. If everything keeps working fine I'm not sure I'll ever know.
@pmkochie
Copy link

pmkochie commented Dec 1, 2017

I use a 1 liner PowerShell script to disable all of the Microsoft Wi-Fi Direct Virtual Adapters:
Get-NetAdapter -InterfaceDescription "Microsoft Wi-Fi Direct Virtual*" | Disable-NetAdapter -Confirm:$false

@ericepp24
Copy link

Thanks pmkochie! The powershell trick worked like a charm.

@victrola
Copy link

Good thinking

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment