Forget a Wi-Fi network on Windows with netsh
Remove a saved wireless profile so Windows stops auto-connecting to a network, using netsh wlan delete profile.
01Command
$ netsh wlan delete profile name="CoffeeShopWiFi"02What it does
Windows remembers every Wi-Fi network you join and reconnects automatically. The `netsh wlan delete profile` command deletes one saved profile by name, without affecting other networks. List saved profiles first with `netsh wlan show profiles` if you are not sure of the exact name.
03Risk
04Undo
$ netsh wlan add profile filename="C:\path\to\profile.xml" user=current05Sources
- netshEvidence: Documents netsh WLAN commands including `netsh wlan show profile name=... key=clear` and `netsh wlan delete profile name=...`.
- Netsh commands - Windows CMDEvidence: Reference for netsh context commands such as wlan delete profile and winhttp proxy.
Last verified: 2026-09-18 · Category: Network
06Related solutions
One command that shows OS version, install date, boot time, memory, network adapters and installed hotfixes.
Built-in Windows command to compute MD5, SHA1 or SHA-256 hashes of any file.
Enumerate every wireless network Windows remembers, inspect a profile's settings, and export profiles for backup or transfer to another PC.