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.
The main commands that you will be using for that are the following ones:
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.
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)
Advertising revenue is falling fast across the Internet, and independently-run sites like Ghacks are hit hardest by it. The advertising model in its current form is coming to an end, and we have to find other ways to continue operating this site.
We are committed to keeping our content free and independent, which means no paywalls, no sponsored posts, no annoying ad formats or subscription fees.
If you like our content, and would like to help, please consider making a contribution:
Ghacks is a technology news blog that was founded in 2005 by Martin Brinkmann. It has since then become one of the most popular tech news sites on the Internet with five authors and regular contributions from freelance writers.