markdown 如何禁用wifi微软虚拟wifi适配器。

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了markdown 如何禁用wifi微软虚拟wifi适配器。相关的知识,希望对你有一定的参考价值。

# 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.

以上是关于markdown 如何禁用wifi微软虚拟wifi适配器。的主要内容,如果未能解决你的问题,请参考以下文章

如何在没有用户交互的情况下禁用 wifi 辅助

如何判断“移动网络数据”是启用还是禁用(即使通过 WiFi 连接)?

Android:如何以编程方式启用/禁用 Wifi 或 Internet 连接

Android:如何以编程方式启用/禁用 Wifi 或 Internet 连接

如何在手机中检查 WIFI 和 3G(数据计划)中的网络连接启用或禁用?

vm客户机操作系统已禁用CPU,请关闭或重置虚拟机。要如何解决?