首页 > 其他分享 >用命令行禁用网卡

用命令行禁用网卡

时间:2022-08-13 11:32:41浏览次数:68  
标签:set netsh 禁用 网卡 命令行 interface 以太网

1、首先打开电脑桌面按下键盘的win+R组合快捷键。
2、然后在弹出的页面中输入 cmd 回车。
3、然后即可进入命令行界面。
4、然后在命令行中输入 netsh interface set interface "本地连接" disabled,回车,这样就可以禁用网卡了。
5、若是想要启用的话,则输入 netsh interface set interface "无线网络连接" enabled,回车,这样就可以启用网络了。

 

出处:https://zhidao.baidu.com/question/553977590.html

 

查看可用的网卡命令:
netsh lan show interfaces

查看所有网卡命令,包括已禁用的:
netsh interface show interface

 

个人使用

禁用或启用指定网卡

netsh lan show interfaces | find "以太网" > nul && (netsh interface set interface "以太网" disabled)||(netsh interface set interface "以太网" enabled)

 

标签:set,netsh,禁用,网卡,命令行,interface,以太网
From: https://www.cnblogs.com/mq0036/p/16582656.html

相关文章