When you click on the network icon on the Taskbar to connect to a WiFi network, Windows displays all available networks, making it easy for you to select and connect.
However, if there are too many WiFi networks or access points nearby, the WiFi connections may appear cluttered, and you may have to move around a lot to find the necessary access point. In this case, you can use Command Prompt to manage WiFi connections on Windows 10.
Disable WiFi connection
In Windows, there's no direct option provided within the Settings app or Control Panel to disable WiFi connection. However, you can easily accomplish this using Command Prompt. To disable WiFi connection, all you need is the network name or SSID. To get the WiFi network name, simply look in the network connection window (right-click on the network icon in the Taskbar).
When a WiFi connection is disabled, it no longer appears in the list of available networks, and you won't be able to connect to that network.
First, type Command Prompt into the Search box on the Start Menu, from the search results list, right-click on it and select Run as Administrator.
On the Command Prompt window, execute the command below to block WiFi network connection. Remember to replace WiFi Network Name with your network name or SSID.
netsh wlan add filter permission=block ssid='WiFi Network Name' networktype=infrastructure
After executing the command, your WiFi network will be added to the blacklist filter list, and you won't see or connect to that WiFi anymore.
If you want to allow the WiFi network again, you just need to remove it from the blacklist. To do this, follow similar steps and enter the command below 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 name of the blocked network, you can 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
In addition to blocking selected WiFi networks and allowing others, you can allow selected WiFi networks and block others. This whitelist type of list is quite useful in case you want your system to only connect to trusted networks.
Similarly, open Command Prompt as Admin and execute the command below to allow a WiFi network:
netsh wlan add filter permission=allow ssid='WiFi Network Name' networktype=infrastructure
Note: Replace WiFi Network Name with the actual SSID.
If you have multiple WiFi connections, repeat the same steps to add the WiFi network to the whitelist filter. After completing this, use the following CMD command to block all networks not in the whitelist:
netsh wlan add filter permission=denyall networktype=infrastructure
From now on, your system can only view and connect to WiFi networks that are allowed. If you want to block a WiFi network that was previously allowed, all you need to do is remove that entry from the allow 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 the whitelist to allow specific WiFi networks and block all others, you can use the following command. This CMD command will delete the 'deny all' filter and allow all WiFi networks in the whitelist as well as other networks:
netsh wlan delete filter permission=denyall networktype=infrastructure
The article on Mytour just guided you on 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 Mytour.
In addition to using Command Prompt to block or allow WiFi connections on Windows 10, you can also explore 5 Command Prompt tricks that few users know to enhance your Command Prompt skills.
