# Friday, 17 July 2015

I move around quite a bit and my laptop connects to Wi-Fi networks all over the world. Sometimes I return to those places and re-connect to the same network weeks or months later.

Once in a while, this causes a problem when a Wi-Fi network security credentials change and laptop's saved Wi-Fi settings continue to use the credentials I entered last time, without allowing me to enter the new credentials.

The simplest solution to this problem is to remove the Wi-Fi network from my laptop's list of saved networks Wi-Fi networks; then, re-add it. If it's not a hidden network, it should automatically appear when you are in range, even if it is not "saved".

But the option to remove a saved Wi-Fi network changes with each version of Windows and it may even be missing in some versions (I still can't find it in the Windows 10 preview I'm currently running).

However, you can use the command line to accomplish this. Here are the steps.

Open a command prompt as an Administrator. This is an option when you right-click the command prompt shortcut. It requires confirmation because you can wreak a lot of havoc as an administrator.

At the command prompt, type "netsh" and press ENTER to go into
network shell mode. The command prompt changes to
netsh>
as shown in Figure 1.

Forget-Fig1-netsh
Figure 1

At the netsh prompt, type "wlan show profiles" and press ENTER to display a list of all saved Wi-Fi networks, as shown in Figure 2.

Forget-Fig2-ShowProfiles
Figure 2 

Find the network you want to remove; then type "wlan delete profile name=<network name>", where network name is the network as listed in the last command. This must be surrounded by quotes. Spelling is important but capitalization is not. Press ENTER to remove this network, as shown in Figure 3.

Forget-Fig3-DeleteProfiles
Figure 3

That's it. You can close the command prompt or type "exit" and press ENTER to leave Network Shell Mode. I recommend not leaving and Administrator-level command prompt open in case you forget the power you have.

Here’s a summary of the steps:

netsh
 
wlan show profiles
 
wlan delete profile name=”<network name>
 

This method appears to work for Windows 7, 8, 8.1, and 10. Don’t get caught unable to connect to a wi-fi network again.