Search code examples
command-linewindows-10netshwifi

Netsh command doesn't update the networks


In order to show the signal strength of the wireless networks (in Windows 10.)

I use:

netsh wlan show networks mode=bssid | findstr /I /R "SSID | signal"

and I get the following result:

SSID 1 : Tecnun/CEIT-Guest
    BSSID 1                 : 38:20:56:a1:d5:4e
         Signal             : 35%
    BSSID 2                 : 38:20:56:8d:66:4e
         Signal             : 35%
    BSSID 3                 : 38:20:56:8d:9e:a1
         Signal             : 40%
SSID 2 : eduroam
    BSSID 1                 : 70:62:b8:16:e6:42
         Signal             : 28%

. . . etc

But the signal can change, for example, if I move to another location.

If I repeat the same command in a different location and I get the same answer where I should have different signal strength even different networks.

Only when I click the WiFi icon (settings) in the tool bar and I repeat the command, the answer of the command is updated, for example:

SSID 1 : DBUS_488
    BSSID 1                 : 00:12:7b:43:ae:63
         Signal             : 28%
SSID 2 : prueba_1
    BSSID 1                 : 38:20:56:a1:d5:41
         Signal             : 33%

. . .etc

Is there any different way (command or whatever) to do this updating?


Solution

  • The networks are updated when a scan is completed by your WiFi card. The netsh command you are running does not request a scan, it only displays the cached results of the last scan.

    Opening the network flyout updates the results because the network flyout happens to request a scan when it first opens.

    There is no netsh command to request a scan like this. You would have to write some code, leveraging either the Win32 WlanScan function (C# wrappers exist if you prefer that), or the WinRT ScanAsync function.