In the above command, make sure that you type the actual WiFi Network Name (in SSID field) that you want to block from appearing on your computer.
On the Command Prompt screen, type netsh wlan add filter permission=block ssid=”Name of WiFi Network that you want to block” networktype=infrastructure and hit the enter key on the keyboard of your computer. To block WiFi Network on your computer, right-click on the Start button and click on Command prompt (Admin) option. Depending on your case, you can either block all unknown WiFi Networks on your computer, block a single WiFi Network having an inappropriate name or block certain WiFi Networks that are open.