Connect to Wi-Fi from the Windows command line
Start a wireless connection to a saved network profile with netsh wlan connect.
Run `netsh wlan connect name="NetworkName"` to connect to a Wi-Fi network that is already saved on the PC.
01Command
Command
$ netsh wlan connect name="HomeWiFi"02What it does
netsh wlan connect starts a connection using an existing wireless profile, so it works for networks whose password Windows already stores. Use `netsh wlan show profiles` to list the exact profile names. For a network that was never joined, import a profile XML with `netsh wlan add profile`.
03Risk
!Warning: The name after name= is the saved profile name, which may differ from the network name shown in the Wi-Fi list.
04Undo
Undo
$ netsh wlan disconnect05Sources
- 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
Get a Full System Summary with systeminfo
One command that shows OS version, install date, boot time, memory, network adapters and installed hotfixes.
Verify File Hashes with certutil -hashfile
Built-in Windows command to compute MD5, SHA1 or SHA-256 hashes of any file.
List saved Wi-Fi profiles with netsh wlan
Enumerate every wireless network Windows remembers, inspect a profile's settings, and export profiles for backup or transfer to another PC.