禁用:
net -c interface set interface "你的网卡名(比如本地连接1)" disabled disconnected "你的网卡名(比如本地连接1)"
启用:
net -c interface set interface "你的网卡名(比如本地连接2)" enabled connected "你的网卡名(比如本地连接2)"
不知道为什么,这个最后一个重命名必须写,不写就说我命令参数不正确
具体可以查看:netsh /?
博客介绍了网卡禁用和启用的命令操作。禁用网卡使用 'net -c interface set interface' 并指定网卡名;启用网卡同样指定网卡名。还提到最后一个重命名必须写,否则命令参数会报错,可通过 'netsh /?' 查看具体信息。
禁用:
net -c interface set interface "你的网卡名(比如本地连接1)" disabled disconnected "你的网卡名(比如本地连接1)"
启用:
net -c interface set interface "你的网卡名(比如本地连接2)" enabled connected "你的网卡名(比如本地连接2)"
不知道为什么,这个最后一个重命名必须写,不写就说我命令参数不正确
具体可以查看:netsh /?
2944

被折叠的 条评论
为什么被折叠?
