"netsh wlan show networks" only shows the currently connected WiFi network

1

I am using Windows 10 Pro. Often when I run "netsh wlan show networks" it only shows the currently connected WiFi network. Here is the output from that:

Interface name : Wi-Fi
There are 1 networks currently visible.

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

When this happens I have found that if I hover over the WiFi icon in the taskbar I can see all of the available networks. After hovering over the WiFi icon and showing those networks, if I run "netsh wlan show networks" it will now display a list of all of those networks. Here is the output at that point:

Interface name : Wi-Fi
There are 6 networks currently visible.

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

SSID 2 : DIRECT-6E-HP OfficeJet Pro 8710
Network type : Infrastructure
Authentication : WPA2-Personal
Encryption : CCMP

... and so on

If I wait a few minutes and try again netsh will be back to only showing the connected network. And if I hover over the WiFi icon again netsh will once again show all of the networks.

I have verified with a wifi analyzer on my phone that the other networks are always there and have strong signals, even when netsh is only showing the connected network.

Any ideas?

Follow up: I asked three of my co-workers to try the command and it showed all of the available wifi networks for them.

john va

Posted 2019-06-09T04:02:55.803

Reputation: 13

Try in an elevated cmd: set autoconfig enabled=yes interface="Wireless Network Connection". Replace "Wireless Network Connection" with your own adapter name. – harrymc – 2019-06-09T12:47:03.200

Thanks for the suggestion. From a cmd prompt as admin I did netsh wlan set autoconfig enabled=yes interface="Wi-Fi" it responded with Auto configuration has been enabled on interface "Wi-Fi". That had no effect on the issue. – john va – 2019-06-10T12:39:21.333

As a follow-up, I tried disabling autoconfig to see what happened. Here is what netsh wlan show networks then reported for the "Wi-Fi" interface: Visible networks cannot be displayed because auto configuration has been disabled on the interface. So obviously I want autoconfig enabled and it must have been already enabled before. – john va – 2019-06-10T13:00:19.957

Strange. I would suggest to check for an update to the network adapter driver, or try another USB adapter for Wi-Fi. – harrymc – 2019-06-10T16:34:56.210

Answers

0

Try this in some bash snippet (ie. bash.sh).

netsh wlan disconnect
sleep 1
netsh wlan show networks
sleep 3
netsh wlan connect ssid="<your_ssid>" name="<your_ssid>"
sleep 120

egirgin

Posted 2019-06-09T04:02:55.803

Reputation: 16

1Does it have to be in bash? – Scott – 2019-07-29T14:35:22.337

you can use cmd instead and sleep statements are required for give an interval to OS to scan for visible connections. – egirgin – 2019-07-30T07:42:02.050

You might want to research the timeout command (in Windows)  and provide an alternative version of your answer for people who don’t have a Unix or Unix-like subsystem on their Windows platforms. – Scott – 2019-07-30T16:12:04.287

yeah possible but the snippet above worked for me in windows command prompt idk if it works for linux, mac or smt else. – egirgin – 2019-07-31T17:10:14.940

My point (which I guess I never actually said) is that the sleep command is not standard in all versions of Windows. – Scott – 2019-07-31T20:46:01.563

Oh, I see. I'll search around. thanks for contribution. :) – egirgin – 2019-08-02T07:00:46.943