使用cmd连接到新的wifi网络 [英] Connect to new wifi network with cmd

查看:164
本文介绍了使用cmd连接到新的wifi网络的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用命令提示符连接到 Wifi 网络,我知道用命令netsh wlan 连接名称[网络名称]我可以连接到已知的网络.如何通过将密码作为参数传递到未知网络?

How do I connect to a Wifi network With a command prompt, I know that with the command netsh wlan connect name [network name] I can connect to an already known network. How do I connect to an unknown network by passing the password as a parameter?

推荐答案

您需要先创建一个配置文件.最简单的方法是首先转储系统上的所有 Wi-Fi 配置文件:

You need to create a profile first. Easiest way to do is to dump all Wi-Fi profiles on the system first:

netsh wlan export profile

选择此命令正在创建的 .xml 文件之一并根据您的需要进行调整.为了在配置文件中输入未加密的密码(而不是密钥材料),请将protected"设置为false"并简单地输入您的密码作为 keyMaterial,例如:

Pick one of the .xml files that are being created by this command and adapt it to your needs. In order to enter an unencrypted passphrase to the profile (instead of key material), set "protected" to "false" and simple enter you passphrase as keyMaterial, e.g.:

  <sharedKey>
    <keyType>passPhrase</keyType>
    <protected>false</protected>
    <keyMaterial>12345678</keyMaterial>
  </sharedKey>

当然,你还需要改变网络的SSID等等...

Of course, you need also to change the SSID of the network, etc...

使用以下命令将配置文件导入系统:

Import the profile back into the system using this command:

netsh wlan add profile myprofile.xml

在 Microsoft 网站上查找更多信息:https://docs.microsoft.com/de-de/intune/configuration/wi-fi-profile-shared-key

Find more information on the Microsoft Website: https://docs.microsoft.com/de-de/intune/configuration/wi-fi-profile-shared-key

这篇关于使用cmd连接到新的wifi网络的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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