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?

The answer, is, ahem, thusly:

C:\>netsh wlan connect name=HANSELMAN-N

Connection request was completed successfully.

netsh wlan connect name=Brossard ssid=Brossard interface=“Wireless Network Connection” > Connection request was completed successfully.

Show key code (run as admintrator):

netsh wlan show profile name=SSID key=clear


Site d’origine :

More Details#

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

netsh wlan connect ssid=YOURSSID name=PROFILENAME

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

C:\>netsh wlan show profile

Profiles on interface Wireless Network Connection:…snip..User profiles#

    All User Profile     : Clear Spot b0e     All User Profile     : HANSELMAN-N     All User Profile     : 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”

And of course, you can

netsh wlan disconnect

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

netsh wlan dump

This is nice because you can

netsh wlan dump > myconfig.txt

on one machine and then later on another machine

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.