runliuv

runliuv@cnblogs

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

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”是无线网卡的名称。

posted on 2024-09-05 00:07  runliuv  阅读(46)  评论(0编辑  收藏  举报