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
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