Clicking the network icon on your Windows laptop or PC shows several “available” Wi-Fi networks. Due to all of the unneeded access points, the pop-up can look cluttered, and you have to scroll a bit to find your desired network. Additionally, some of these networks may be open and unencrypted. This guide lists several options for blocking and allowing Wi-Fi networks in Windows.
Table of Contents
Block Wi-Fi Networks in Windows
Windows doesn’t provide any options in the Settings app or Control Panel, but you can easily block a Wi-Fi network using one of the methods shown below.
1. Command Prompt (One Wi-Fi Network at a Time)
The command prompt offers a quick fix to removing one or more unneeded Wi-Fi networks. All you need is the network name or SSID.
To start, search for “Command Prompt” (or “cmd”) in the Windows search menu, right-click it, and select Run as Administrator.
To identify the SSIDs you want to block, tap the network icon on the taskbar, and click on the Manage Wi-Fi connections arrow. It will populate a list of Wi-Fi connections in close proximity to your Windows device.

Within the command prompt window, execute the below command to block the Wi-Fi network. Replace “Wi-Fi Network Name” with the actual SSID or network name.
netsh wlan add filter permission=block ssid="Wi-Fi Network Name" networktype=infrastructure
Once you execute the command, the Wi-Fi network will be added to the blacklist filter, and you should see a message that reads: “The filter is added on the system successfully.” You can add multiple blacklist filters for different SSIDs in separate lines. They will all be blocked one by one.

When you block a Wi-Fi network, it will no longer appear in the network connections pop-up, and you won’t be able to connect to it. To verify this, go to Settings -> Network & internet -> Wi-Fi -> Show available networks. The blacklisted SSIDs will no longer be visible.

Tip: when you travel, you may come across unknown public Wi-Fi networks. If it is necessary to use them, check out our list of dos and don’ts of using public Wi-Fi networks.
2. Command Prompt (Block Wi-Fi Networks in Bulk)
Instead of removing unneeded Wi-Fi networks one by one, you can also remove them in bulk and only allow the Wi-Fi networks you’re planning to use.
Return to the elevated command prompt, and type the following command. Before pressing Enter, make sure to make note of the SSID your Windows device is currently connected to; otherwise, it will completely disconnect from the Internet.
netsh wlan add filter permission=denyall networktype=infrastructure

After inserting the “deny all” command, start adding exceptions to it, beginning with the Wi-Fi network you are currently connected to. Instead of “Wi-Fi SSID,” add the SSID names that you want to allow. Add multiple exceptions in separate lines.
netsh wlan add filter permission=allow ssid="Wi-Fi SSID" networktype=infrastructure
It’s quite pleasant to have a clutter-free Wi-Fi icon on your Windows taskbar. You will longer be inundated with shady Wi-Fi networks.

If you mistakenly entered the bulk blacklist without taking note of the SSID of your current network, go back to your router dashboard on another device. Or, if you’re connecting using a mobile hotspot, check the network name on your Android or iPhone, then add the proper SSID name in.

It’s preferable to only enable the bulk “deny all” setting when your Windows device is in the proximity of trusted Wi-Fi networks, such as a home router. This isn’t very convenient if you’re traveling with your laptop.
FYI: you can always temporarily disable Wi-Fi networks so that you don’t get unwanted Wi-Fi connection requests.
3. Using “Manage Known Networks”
As we keep using multiple Wi-Fi networks, their histories get saved on our device. If those SSIDs keep showing up long after you’ve stopped using them, you can permanently erase them from your Windows device.
Go to Settings -> Network & internet -> Wi-Fi -> Manage known networks. Click Forget to remove each Wi-Fi network that you don’t want displayed on your Windows device.

Tip: is your desired Wi-Fi network not showing up on Windows? Check out these options to get your favorite Wi-Fi networks working with your device.
Allow Wi-Fi Networks
Just as you can block certain Wi-Fi networks from appearing on your Wi-Fi network icon, you can also allow them again. The methods are similar to the ones used above to block Wi-Fi networks.
1. Command Prompt (One Wi-Fi Network at a Time)
To allow a particular Wi-Fi network, delete the entry from the blacklist. Go back to the elevated command prompt, and execute the below command while replacing “Wi-Fi Network Name” with the blocked network name.
netsh wlan delete filter permission=block ssid="Wi-Fi Network Name" networktype=infrastructure

Once you enter the command, the blocked Wi-Fi SSID should reappear in the network icon on your system tray.

If you don’t remember the SSID name, use the below command. It will list the names of all the allowed and blocked Wi-Fi networks.
netsh wlan show filters

Tip: learn how to fix the “your Wi-Fi network isn’t secure” message on Windows devices.
2. Command Prompt (Bulk Allow)
If you previously used the “deny all” command to block all Wi-Fi networks from appearing on the Windows Wi-Fi icons display page, you can easily undo it. Just insert the following “delete” command in an elevated command prompt.
netsh wlan delete filter permission=denyall networktype=infrastructure
The command will delete the “deny all” filter and allow all Wi-Fi networks and the ones you added as an exception.

Good to know: we have the answers to why your Wi-Fi network keeps disconnecting on a Windows device.
3. Undo Forget Wi-Fi Network
To regain the forgotten Wi-Fi networks on your Windows device, you mostly just need to restart the device and remain in proximity to the deleted SSID. The network should show up again, and you have to enter the password once before it can be saved.
If that doesn’t work, reset the entire network. One way to do that is to flush your network using ipconfig/flushDNS, which rejigs the network stack. This should enable your Windows device to connect with formerly blocked Wi-Fi networks.
Blocking Wi-Fi networks is needed if you don’t want the networks of other users to interfere with your main connection. Are you struggling with slow Wi-Fi connections in your home? Learn how to get normal Internet speed.
Image credit: DALL-E 3. All screenshots by Sayak Boral.
