If you use a wireless networks and want to allow or block a particular Wi-Fi network in Windows 10, here is how to go about doing it. You can block or allow any specific SSID or wireless network with the help of the Command Prompt.
Block a WiFi network in Windows 10
If you stay in an area, where a lot of Wi-Fi routers are On at all times, whenever you log into your system, your PC will show all the names after clicking the Network button in the system tray. Although it gets connected to the specific network where you have enabled “auto-connect” feature, the presence of too many WiFi networks can make things messy. You can, therefore, hide or block a particular WiFi network from the list.
To do this, open a Command Prompt with administrator privilege and execute the following command-
netsh wlan add filter permission=block ssid="Wireless Network Name" networktype=infrastructure
Do not forget to replace the Wireless Network Name with the actual name that you want to block.
If you receive The filter is added on the system successfully message, you won’t be able to see that network on the list.
Remove a blocked WiFi network
If you have mistakenly blocked a wrong wireless network, and you want to delete that filter, here is what you need to do. You need to enter the following command in an elevated Command Prompt window-
netsh wlan delete filter permission=block ssid="Wireless Network Name" networktype=infrastructure
This Wireless Network Name must be the same as the blocked WiFi network name; otherwise, no changes will be made.
How to allow a WiFi network
The following commands will be helpful if you want to hide all the WiFi networks and allow only a particular one.
You need to allow a WiFi network, first, so execute the following command to do this-
netsh wlan add filter permission=allow ssid="Wireless Network Name" networktype=infrastructure
To hide all the networks except the allowed network, execute this command-
netsh wlan add filter permission=denyall networktype=infrastructure
If you want to remove the “deny all” filter or you want to remove all the network names from the blocklist, the following command will do the job-
netsh wlan delete filter permission=denyall networktype=infrastructure
Check all the filters
In case you have forgotten the wireless network name or you just want to see the blacklist or whitelist, here is the command that you need to use-
netsh wlan show filters
Disadvantage of using these commands
The only disadvantage of using these commands is it doesn’t block the actual Wi-Fi router. It does block or allows the wireless network name. That implies that if you change the WiFi name, you will be able to overwrite the filter.
Hope this helps!