Hide or show Wireless Networks in Windows
The Windows operating system is configured to display all available wireless networks when WiFi is enabled on the device running the operating system.
This is helpful of course, as it enables you to pick the wireless network from the list of available ones to connect to it.
It becomes less useful once you have made the decision. If you only connect to one wireless network for instance, you may want to hide the other wireless networks to speed up the process and avoid picking the wrong network from the list.
All recent versions of the Windows operating system support commands that you can run that hide or show wireless networks on the operating system.
Hide or show Wireless Networks in Windows
The main commands that you will be using for that are the following ones:
- netsh wlan show networks
- netsh wlan add filter permission=allow ssid=mynetworkname networktype=infrastructure
- netsh wlan add filter permission=block ssid=notmynetwork networktype=infrastructure
- netsh wlan add filter permission=denyall networktype=infrastructure
- netsh wlan delete filter "parameters"
netsh wlan show networks
This command lists all available wireless networks in the command prompt window. Since you need to specify the SSID of the wireless networks that you want to allow, you may find it useful to display those using the command.
The command is also useful if you want to block select wireless networks, but not all of them.
netsh wlan add filter permission=allow ssid=mynetworkname networktype=infrastructure
This command adds the wireless network "mynetworkname" to the list of allowed networks. This is useful if you use the "denyall" filter, as it hides all wireless networks that are not in the whitelist.
Note: you need to enclose the SSID of the network in "network name" if it contains a space.
netsh wlan add filter permission=block ssid=notmynetwork networktype=infrastructure
This filter hides the specified wireless network from the list of wireless networks. It won't show up when you click on the network icon in Windows to list all available wireless networks.
Useful, if you want to make sure that a particular network is never listed again.
netsh wlan add filter permission=denyall networktype=infrastructure
Use this filter to block all wireless networks but the ones that are on the allow filter list. Any network not on the allow list will be hidden automatically when you enable that option.
This makes sense only if you add at least one network to the allow list. Note that this can be quite problematic if you roam a lot, e.g. between home, work, and other locations as you may need to disable the block all filter whenever you are at a new location and need to connect to a wireless network.
Deleting filters
The delete command is useful if you made a mistake, or want to remove a filter such as denyall.
It works exactly as the add filters, and all you have to do is replace "add" with "delete" to use it. Keep the rest of the command as is.
The command netsh wlan delete filter permission=denyall networktype=infrastructure would remove the block all filter from the device again. (Thanks Sergey)
How does one block a “Hidden Network”, without a visible, known SSID?
For eg., netsh wlan add filter permission=block ssid=Hidden Network networktype=infrastructure (would only work if the actual SSID name is “Hidden Network”), using,
netsh wlan show all
I’ll find for eg., SSID3, but it hasn’t a name… in my available list in win10 taskbar, shows as Hidden Network. I don’t want to see it! I know I could create a block all rule, whitelisting mine, but I would rather block specific SSID’s. ))
Any help to block unknown SSID names (hidden) would be most appreciated! Thansk
commands wrong relates to infastructure: rather than infrastructure=
Thank you, corrected!
Commands are Wrong, Please Correct it as soon as Possible!!!!
What is wrong with them?
I have been using this to display the connected channel and rate in a batch file, followed by iperf3 to test my access point after flashing dd-wrt, etc.
The biggest question is still unanswered.
One cannot managed already saved WiFi networks in Windows 10.
Unless one is connected to some in which case ‘status’ option is available, hence its configuration.
Command prompt (netsh wlan command, that is) is useful only to display their information, but one has to delete the network and reconnect to it in case its security configuration has changed for example.
Creators Update should address that – is really ridiculous to take Managing of WiFi network out of Windows 10. Same about managing their priority, again via command prompt. Great!
Nice 1 Martin..
On a related\non-related note, anything similar for our android phones?
Such as built in commands or something close that doesn’t requiere an installation of external app?
Thanks a bunch :)