If you have multiple WiFi connections, you can configure Windows to allow or block specific WiFi connections. This article from TipsMake will guide you on how to use Command Prompt (CMD) to block or allow WiFi connections on Windows 10. You can also apply this method to block untrusted WiFi networks.
When you click on the network icon on the Taskbar to connect to a WiFi network, Windows will display all available WiFi networks, making it easy for you to select and connect to a network.
However, if there are too many WiFi networks or access points near you, the WiFi connections can look quite cluttered, and you have to move around quite a bit to find the necessary access point. In this case, you can use Command Prompt to block or allow WiFi connections on Windows 10.
Block WiFi connection
Windows doesn't offer any options in the Settings app or Control Panel; however, you can easily block WiFi connections using the Command Prompt. To block a WiFi connection , all you need is the network name or SSID. To get the WiFi network name, simply look for it in the network connections window (right-click the network icon on the Taskbar).
When a WiFi connection is blocked, it no longer appears in the network connections window, and you cannot connect to that network.
First, type Command Prompt into the Search box on the Start Menu. In the search results list, right-click and select Run as Administrator .
In the Command Prompt window, execute the following command to block the WiFi network connection. Note that you should replace WiFi Network Name with your network name or SSID.
netsh wlan add filter permission=block ssid="WiFi Network Name" networktype=infrastructure
After the command is executed, your WiFi network will be added to the blacklist, and you will no longer see or connect to that WiFi network.
If you want to re-enable the WiFi network, simply remove the item from the blacklist. To do this, follow the same steps and enter the following command into the Command Prompt window:
netsh wlan delete filter permission=block ssid="WiFi Network Name" networktype=infrastructure
Note: Replace WiFi Network Name with the name of the blocked network connection.
If you don't remember the names of the blocked networks, use the command below. This command will list the names of all allowed and blocked WiFi networks:
netsh wlan show filters
Allow WiFi network connection
Besides blocking selected WiFi networks and allowing others, you can also allow selected WiFi networks and block others. This type of whitelisting is quite useful if you want your system to only connect to trusted networks.
Similarly, open Command Prompt as an administrator and execute the following command to enable a WiFi network:
netsh wlan add filter permission=allow ssid="WiFi Network Name" networktype=infrastructure
Note : Replace WiFi Network Name with the actual SSID name.
If there are multiple WiFi connections, repeat the same steps to add the WiFi networks to the whitelist filter. Once done, use the CMD command below to block all networks that are not on the whitelist:
netsh wlan add filter permission=denyall networktype=infrastructure
From now on, your system can only view and connect to allowed WiFi networks. If you want to block a previously allowed WiFi network, all you need to do is remove that entry from the allowed list. To do this, use the command below:
netsh wlan delete filter permission=allow ssid="WiFi Network Name" networktype=infrastructure
If you don't want to use a whitelist that allows specific WiFi networks and blocks all others, use the command below. This CMD command will remove the 'deny all' filter and allow all WiFi networks on the whitelist as well as others:
netsh wlan delete filter permission=denyall networktype=infrastructure
The article on TipsMake just showed you how to use Command Prompt to block or allow WiFi connections on Windows 10. Share your opinions and experiences on how to block and allow WiFi connections on Windows 10 with TipsMake!
In addition to the methods of using Command Prompt to block or allow WiFi connections on Windows 10 mentioned above, you can also check out 5 lesser-known Command Prompt tips to improve your Command Prompt skills.