1

正如标题所示。尝试使用以下内容通过批处理文件启用/禁用虚拟适配器。

C:\Windows\system32>wmic nic get name, index
    Index  Name
    0      WAN Miniport (L2TP)
    1      WAN Miniport (SSTP)
    2      WAN Miniport (IKEv2)
    3      WAN Miniport (PPTP)
    4      WAN Miniport (PPPOE)
    5      WAN Miniport (IP)
    6      WAN Miniport (IPv6)
    7      WAN Miniport (Network Monitor)
    8      Microsoft ISATAP Adapter
    9      RAS Async Adapter
    10     Realtek PCIe FE Family Controller
    11     Qualcomm Atheros AR9002WB-1NG Wireless Network Adapter
    12     Microsoft Wi-Fi Direct Virtual Adapter
    13     Microsoft ISATAP Adapter
    14     Teredo Tunneling Pseudo-Interface
    15     Microsoft ISATAP Adapter
    16     Bluetooth Device (Personal Area Network)
    18     Microsoft 6to4 Adapter
    23     Microsoft ISATAP Adapter
    25     Microsoft Hosted Network Virtual Adapter
    26     Microsoft ISATAP Adapter
    27     Microsoft ISATAP Adapter
    28     Microsoft ISATAP Adapter
    29     Microsoft ISATAP Adapter
    30     Microsoft ISATAP Adapter #9
    31     Microsoft ISATAP Adapter

--- 禁用 Microsoft 托管网络虚拟适配器(索引 = 25)

C:\Windows\system32>wmic path win32_networkadapter where index=25 call disable
Executing (\\COMPUTER\root\cimv2:Win32_NetworkAdapter.DeviceID="25")->disable()
Method execution successful.
Out Parameters:
instance of __PARAMETERS
{
        ReturnValue = 0;
};

--- 启用 Microsoft 托管网络虚拟适配器 (index=25)

C:\Windows\system32>wmic path win32_networkadapter where index=25 call enable
Executing (\\COMPUTER\root\cimv2:Win32_NetworkAdapter.DeviceID="25")->enable()
ERROR:
Description = Invalid method Parameter(s)

^^^ 好像不想工作?!?

4

0 回答 0