我知道 Google 上有大量这样的结果:results ,但我没有在我的 Windows XP 机器上成功。我想从命令行禁用 LAN 连接。
>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.
最佳答案
对于前两个命令,您需要提升/管理员权限:
禁用 LAN 网络连接
C:\> netsh interface set interface name="Local Area Connection" admin=disabled
启用 LAN 网络连接
C:\> netsh interface set interface name="Local Area Connection" admin=enabled
假设:您的接口(interface)被命名为“本地连接”,否则请替换为正确的名称。使用netsh interface show interface
查找名称。
列出 Wifi 配置文件
C:\> netsh wlan show profiles
连接到 Wifi 配置文件
C:\> netsh wlan connect name="ProfileName"
关于networking - 从命令行启用/禁用网络连接,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19831023/