dos命令 禁用网络链接

时间:2023-03-08 16:32:10
dos命令 禁用网络链接

获取所有的网络链接接口:

C:\Users\Chris.JENNEY>netsh interface show interface

Admin State     State      Type Interface     Name
-------------------------------------------------------------------------
Disabled     Disconnected    Dedicated       Local Area Connection
Enabled      Connected      Dedicated       Wireless Network Connection
Disabled     Disconnected    Dedicated       Wireless Network Connection 2

打开指定网络链接

C:\Users\Chris.JENNEY>netsh interface set interface name="Local Area Connection"
admin=enabled

关闭指定网络链接
C:\Users\Chris.JENNEY>netsh interface set interface name="Local Area Connection"
admin=disabled