Windows – Connecting to Wireless Network via Command Prompt in Windows 7

command lineinternet connectionnetshwindows 7wireless-networking

When I click on the network and press 'Connect', nothing happens, and I am down to doing this at the coding level now.

I've tried:

netsh wlan connect name=MOTOROLA-9156F ssid=MOTOROLA-9156F interface="Wireless Network Connection"

And in return I get:

There is no profile "MOTOROLA-9156F" assigned to the specified interface.

Meantime, this network shows up under my networks, and I'm on the network on my brothers computer.

What could I be doing wrong? Thanks!

EDIT:
i made a profile xml file and added it successfully. now, when i run the connect command, it says its connected successfully, but the internet icon shows that it is "Connecting" and then stops connecting. something is very very wrong here. i've put the passphrase inside the network's properties and it doesn't prompt me for one.

Best Answer

As i explored about this error, i got a similar thread at Microsoft support that somewhat like your problem - Netsh cannot connect to unsecured network - Check this link first .

“If only one SSID is specified in the profile, then the specified SSID is used to connect, and the ssid parameter is not required. If the profile specifies multiple SSIDs, the SSID parameter is required.”

you may use the command netsh as netsh wlan conncet ssid=[Your SSID of the unsecured wireless network] name=[Your current profile name].

The interface parameter is one of the interface names shown by the netsh wlan show interface command

To list SSID, use this command netsh wlan show profiles

Please refer to the section “connect [[ssid=]WirelessNetworkName] name=ProfileNameinterface=InterfaceName”.

Check this one also for reference.

Related Question