如何在Windows 7中从命令行连接到无线WIFI网络

For the humorless amongst you who didn't find these Updated for 2011 - McDonald's WiFi Guide with updates for Mac OS X Lion and Windows 7 to be HIGH-LARIOUS, the question was asked, "well, sir, how do you connect to a Wireless WIFI Network from the Command line in Windows 7?"

对于那些没有幽默感的人,他们没有发现这些“ 2011年更新版-麦当劳WiFi指南”,其中Mac OS X Lion和Windows 7的更新是“大问题” 有人问“好,先生,您如何连接到Windows 7中从命令行提供无线WIFI网络?

The answer, is, ahem, thusly:

因此,答案是:

C:\>netsh wlan connect name=HANSELMAN-N
Connection request was completed successfully.

C:\> netsh无线局域网连接名称= HANSELMAN-N 连接请求已成功完成。

Cool.

凉。

更多细节 (More Details)

What happened there? Well, the command line is netsh wlan and the full one is

那里发生什么了? 好吧,命令行是netsh wlan,完整的是

netsh wlan connect ssid=YOURSSID name=PROFILENAME

netsh wlan connect ssid =您的ID名称= PROFILENAME

What's a profile? It's the only thing required. You can see them with:

什么是个人资料? 这是唯一需要的东西。 您可以通过以下方式看到它们:

C:\>netsh wlan show profile

C:\> netsh wlan显示配置文件

Profiles on interface Wireless Network Connection:
.
..snip.. User profiles
-------------
    All User Profile     : Clear Spot b0e
    All User Profile     : HANSELMAN-N
    All User Profile     : Quiznos

接口无线网络连接上的配置文件: ..snip .. 用户资料------------- 所有用户个人资料:Clear Spot b0e 所有用户个人资料:HANSELMAN-N 所有用户个人资料:Quiznos

These are the same ones that you see in the wireless networks dialog...

这些与您在无线网络对话框中看到的相同...

Manage Wireless Networks

You can set these up and refer to them by name from the command line, or a batch file, etc. Nice to do for the places you are regularly.

您可以设置这些文件,并从命令行或批处理文件等中按名称进行引用。很适合经常使用的地方。

If you have multiple wireless cards (What's wrong with you!?) then you have to be more specific:

如果您有多个无线网卡(您怎么了!!),那么您必须更加具体:

netsh wlan connect ssid=YOURSSID name=PROFILENAME interface="WIRELESS NETWORK CONNECTION"

netsh wlan connect ssid =您的ID名称= PROFILENAME interface =“无线网络连接”

And of course, you can

当然,您可以

netsh wlan disconnect

netsh wlan断开连接

And include the interface optionally, for multiple interfaces. Additionally, interesting things can be seen with

并可选地包括该接口,用于多个接口。 此外,有趣的事物可以通过

netsh wlan dump

netsh wlan转储

This is nice because you can

很好,因为您可以

netsh wlan dump > myconfig.txt

netsh wlan转储> myconfig.txt

on one machine and then later on another machine

在一台机器上,然后在另一台机器上

netsh exec myconfig.txt

netsh exec myconfig.txt

All this command line love will work in most versions of Windows, actually, not just 7 AFAIK. There's lots of more detail and docs on managing Wireless Profiles on the Web.

实际上,所有这些命令行功能都可以在大多数Windows版本中运行,而不仅仅是7 AFAIK。 有关在Web上管理无线配置文件的更多详细信息和文档

Enjoy!

请享用!

翻译自: https://www.hanselman.com/blog/how-to-connect-to-a-wireless-wifi-network-from-the-command-line-in-windows-7

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值