从命令行启用/禁用网络连接 [英] Enable/disable network connection from command line

查看:183
本文介绍了从命令行启用/禁用网络连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道Google中有很多结果,因此:结果,但我没有在我的Windows XP机器。我要从命令行禁用LAN连接。

I know that there exists ton of results in Google for this: results, but I didn't make it in my Windows XP machine. I want to disable LAN connection from command line.

>netsh interface set interface "Local Area Connection" DISABLED
One or more essential parameters not specified
The syntax supplied for this command is not valid. Check help for the correct sy
ntax.

>netsh interface set interface name="Local Area Connection" admin="disabled"
One or more essential parameters not specified
The syntax supplied for this command is not valid. Check help for the correct sy
ntax.

>netsh interface set interface name="Local Area Connection" admin=DISABLED
One or more essential parameters not specified
The syntax supplied for this command is not valid. Check help for the correct sy
ntax.


推荐答案

,您需要提升/管理员权限:

For the first two commands, you need elevated/ administrator rights:

禁用局域网网络连接 b

C:\> netsh interface set interface name="Local Area Connection" admin=disabled

启用LAN网络连接

C:\> netsh interface set interface name="Local Area Connection" admin=enabled

strong>您的界面已命名为本地连接,否则替换为专用名称

assumption : your interface was named as "Local Area Connection" else substitute proper name

列出WLAN个人资料

C:\> netsh wlan show profiles

连接到Wifi个人资料
$ b

Connect to Wifi profile

C:\> netsh wlan connect name="ProfileName"

这篇关于从命令行启用/禁用网络连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆