WINDOWS WIN10 WIN 11命令行 禁用网卡 启用网卡
要用管理员身份运行
这条命令会禁用名为RUNLIUV
的网络接口。
netsh interface set interface "RUNLIUV" admin=disable
启用名为RUNLIUV
网卡
netsh interface set interface "RUNLIUV" admin=enable
要用管理员身份运行
启用无线-禁用有线.bat
set MyLan=LAN1
set MyWifi=WLAN
netsh interface set interface "%MyLan%" admin=disable
netsh interface set interface "%MyWifi%" admin=enable
pause
要用管理员身份运行
启用有线-禁用无线.bat
set MyLan=LAN1
set MyWifi=WLAN
netsh interface set interface "%MyLan%" admin=enable
netsh interface set interface "%MyWifi%" admin=disable
pause
其中“LAN1”是有线网卡的名称,“WLAN”是无线网卡的名称。