To block a network, run the following command, replacing “WIFI NAME” with the name (SSID) of the wireless network. This is just the Wi-Fi network name that appears in the standard Wi-Fi popup menu.
netsh wlan add filter permission=block ssid="
WIFI NAME
" networktype=infrastructure
This command filters based on the network name. So, if your neighbor renames their Wi-Fi network, you’ll see the new name appear in your Wi-Fi list.
To undo this change and remove a network from the blocklist, run the following command and replace “WIFI NAME” with the name of the Wi-Fi network:
netsh wlan delete filter permission=block ssid="
WIFI NAME
" networktype=infrastructure