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.

  • Try in an elevated cmd: set autoconfig enabled=yes interface="Wireless Network Connection". Replace "Wireless Network Connection" with your own adapter name. – harrymc Jun 9 at 12:47
  • 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 Jun 10 at 12:39
  • 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 Jun 10 at 13:00
  • Strange. I would suggest to check for an update to the network adapter driver, or try another USB adapter for Wi-Fi. – harrymc Jun 10 at 16:34
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
  • 1
    Does it have to be in bash? – Scott Jul 29 at 14:35
  • you can use cmd instead and sleep statements are required for give an interval to OS to scan for visible connections. – egirgin Jul 30 at 7:42
  • 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 Jul 30 at 16:12
  • yeah possible but the snippet above worked for me in windows command prompt idk if it works for linux, mac or smt else. – egirgin Jul 31 at 17:10
  • My point (which I guess I never actually said) is that the sleep command is not standard in all versions of Windows. – Scott Jul 31 at 20:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.