Windows – How to Force Refresh Wireless Networks from Command Line

netshwindowswindows 8.1wireless-networking

How can I force Windows to re-scan for available wireless networks from the command line?

(i.e. I'm looking for the command-line equivalent of pressing F5 on the GUI.)

Best Answer

I've been looking for the same thing for a while now, unfortunately I can't seem to find anything in the netsh utility to do this. The best solution I was able to come up with was to disable then re-enable the interface through the netsh commands. There's a small delay (1-2 seconds) after enabling the interface where it won't list any networks, but that shouldn't be too hard to workaround.

I'm using the following commands:

netsh interface set interface name="<NIC name>" admin=disabled
netsh interface set interface name="<NIC name>" admin=enabled
netsh wlan show networks

Edit: How to get then the "<NIC name>", i.e., the Network Interface Card name.

First of all use the command netsh wlan show networks

If the wlan is enabled you will get a message like this

C:\Users\user1>netsh wlan show networks

Interface name : WiFi
There are 2 networks currently visible.

SSID 1 : Cross
    Network type            : Infrastructure
    Authentication          : WPA2-Personal
    Encryption              : CCMP

SSID 2 : WLAN-0A8E41
    Network type            : Infrastructure
    Authentication          : WPA2-Personal
    Encryption              : CCMP

So you see, in this case, the interface name is WiFi Now, you can proceed as explained above, for example to disable the wlan card:

netsh interface set interface name="WiFi" admin=disabled

And so on. :)

Related Question