Connecting to Wireless Network via Command Prompt in Windows 7

36,260

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.

Share:
36,260

Related videos on Youtube

Garrett
Author by

Garrett

Updated on September 18, 2022

Comments

  • Garrett
    Garrett over 1 year

    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.

  • Garrett
    Garrett over 12 years
    so how do i make a profile for my new wireless network? i tried export profile, using an existing profile, and then modifying the SSID name inside of it to be MOTOROLA-9156F, but i can't overwrite the file. on top of that, there is a <hex> tag that i probably have to modify to match the SSID name.
  • Niranjan Singh
    Niranjan Singh over 12 years
    have you checked the reference link.. there is much good reference about this command to do everything that possible to do with wireless connections on windows