7

I have created a hosted network in my windows7 system. The netsh wlan show hostednetwork command gives the output

Hosted network settings
-----------------------
    Mode                   : Allowed
    SSID name              : "rambo"
    Max number of clients  : 100
    Authentication         : WPA2-Personal
    Cipher                 : CCMP

Hosted network status
---------------------
    Status                 : Started
    BSSID                  : xx:xx:xx:xx:xx:xx
    Radio type             : 802.11n
    Channel                : 11
    Number of clients      : 1
        xx:xx:xx:xx:xx:xx        Authenticated

But I have forgot the password for this connection and after some googling I found the command netsh wlan refresh hostednetwork YourNewNetworkPassword. But on executing this command it get the error

C:\Users\user>netsh wlan refresh hostednetwork rambo123
Invalid value "rambo123" for command option "data".

Usage: refresh hostednetwork [data=]key

I have no idea what is wrong with this command.

YakovL
  • 759
  • 1
  • 7
  • 25
Nandakumar V
  • 173
  • 1
  • 1
  • 5

2 Answers2

11

You could reset your password by setting the whole network up again ie (via here):

netsh wlan set hostednetwork mode=allow ssid=rambo key=rambo123 keyUsage=persistent

or

netsh wlan set hostednetwork mode=allow ssid=rambo key=rambo123 keyUsage=temporary

Although, if you've forgotten your password, all you need to do is (via here):

netsh wlan show hostednetwork setting=security

Then you'll see User security key: and your password

Command prompt with netsh

ᔕᖺᘎᕊ
  • 6,173
  • 4
  • 33
  • 45
  • thanks @shub `setting=security` worked perfectly. – Nandakumar V Jun 02 '14 at 14:30
  • any idea what was wrong with the `refresh hostednetwork` command... Its still haunting me. – Nandakumar V Jun 02 '14 at 14:31
  • @NandakumarV I'm sorry, I don't know. Although when I tested, this worked: `netsh wlan refresh hostednetwork key` which makes me think that `refresh` actually refreshes the key ie. makes sure it works rather than actually change it because `key` is the 'name' of the password field. Please +1 if you found the answer helpful :) – ᔕᖺᘎᕊ Jun 02 '14 at 17:32
0

Try this format:

netsh wlan set hostednetwork [ssid=]<ssid> [key=]<passphrase> [keyUsage=]persistent|temporary (Source)

So to permanently set the Rambo network's passphrase to "rambo123" it'd be something like:

netsh wlan set hostednetwork rambo rambo123 persistent

Ƭᴇcʜιᴇ007
  • 111,883
  • 19
  • 201
  • 268