# How to disable Microsoft WiFi Direct Virtual Adapter
----
## **I think ** this is how it worked
### As Admin
```powershell
netsh wlan stop hostednetwork
```
Then stop the service
```powershell
netsh wlan set hostednetwork mode=disallow
```
### To turn it back on:
```powershell
netsh wlan set hostednetwork mode=allow
```
then
```powershell
netsh wlan start hostednetwork
```
### Comment says:
I use a 1 liner PowerShell script to disable all of the Microsoft Wi-Fi Direct Virtual Adapters:
```powershell
Get-NetAdapter -InterfaceDescription "Microsoft Wi-Fi Direct Virtual*" | Disable-NetAdapter -Confirm:$false
```
----
# 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.
<br> 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](https://i.gyazo.com/81483bf5a087fe26a05c0e85866fd9f3.png)
- The following is what the relevant parts of running `ipconfig /all` would show.
![](https://i.gyazo.com/6b467db16a925c93262956d74366f64f.png)
- 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.