4

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.

4
  • Try in an elevated cmd: set autoconfig enabled=yes interface="Wireless Network Connection". Replace "Wireless Network Connection" with your own adapter name.
    – harrymc
    Commented Jun 9, 2019 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
    Commented Jun 10, 2019 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
    Commented Jun 10, 2019 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
    Commented Jun 10, 2019 at 16:34

1 Answer 1

1

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
7
  • 1
    Does it have to be in bash? Commented Jul 29, 2019 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
    Commented Jul 30, 2019 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. Commented Jul 30, 2019 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
    Commented Jul 31, 2019 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. Commented Jul 31, 2019 at 20:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .