Windows cho phép lưu mật khẩu kết nối mạng Wi-Fi. Nhờ đó, khi mạng Wi-Fi biết trong phạm vi card mạng không dây, Windows tự kết nối mà không hỏi mật khẩu. Bài viết hướng dẫn trích xuất mật khẩu Wi-Fi đã lưu trên Windows 10, chuyển danh sách mạng không dây đã lưu kèm security key sang máy khác, và cách xóa (quên) WLAN cụ thể.
Trên Windows 10, có thể xem cả mật khẩu Wi-Fi đang kết nối (active) và mật khẩu của tất cả mạng không dây thiết bị từng kết nối. Thông tin này chỉ có trong command prompt dùng công cụ netsh tích hợp.
Tìm mật khẩu Wi-Fi hiện tại trên Windows 10
Nếu thiết bị Windows 10 đang kết nối Wi-Fi, xem mật khẩu (security key) qua Control Panel:
- Start → Settings → Network & Internet → Status → Network and Sharing Center → Change adapter settings; Mở nhanh Network Connections bằng lệnh
ncpa.cpl. - Chuột phải card mạng không dây → Status;

- Tab Security, tích "Show characters";
- Mật khẩu Wi-Fi đang kết nối hiển thị ở trường "Network security key".

Liệt kê mật khẩu Wi-Fi đã lưu dùng Command Prompt
Trên chỉ xem mật khẩu kết nối hiện tại. Muốn xem mật khẩu bất kỳ mạng không dây nào từng kết nối, dùng netsh trong CMD.
Khi kết nối Wi-Fi, Windows tạo WLAN profile chứa tên mạng (SSID), mật khẩu (security key) và tùy chọn bảo mật. Hiển thị danh sách WLAN profile đã lưu:
netsh wlan show profile
Xem chi tiết profile cụ thể và mật khẩu đã lưu, chỉ định SSID. Ví dụ:
netsh wlan show profile "Xiaomi_10D1" key=clear
Profile Xiaomi_10D1 on interface Wi-Fi: ... Security key: h33K3*d2
Mật khẩu Wi-Fi đã lưu ở trường Security key.
Windows lưu WLAN profile tại %ProgramData%\Microsoft\Wlansvc\Profiles\Interfaces.
Hiển thị tất cả mật khẩu Wi-Fi đã lưu dùng PowerShell
Dùng PowerShell liệt kê tất cả SSID và mật khẩu đã lưu. One-liner PowerShell hiển thị mật khẩu mọi WLAN profile:
(netsh wlan show profiles) | Select-String "\:(.+)$" | %{$name=$_.Matches.Groups[1].Value.Trim(); $_} | %{(netsh wlan show profile name="$name" key=clear)} | Select-String "Key Content\W+\:(.+)$" | %{$pass=$_.Matches.Groups[1].Value.Trim(); $_} | %{[PSCustomObject]@{ PROFILE_NAME=$name;PASSWORD=$pass }} | Format-Table –Wrap
Xuất ra file text trên Desktop, thêm pipe cuối lệnh:
| Format-Table -AutoSize | Out-File $env:USERPROFILE\Desktop\SavedWiFiPass.txt
Xuất và nhập WLAN Profile trên Windows 10
Có thể xuất cài đặt WLAN profile kèm security key ra file XML, sau đó import sang máy khác.
Xuất WLAN profile:
netsh wlan export profile name="Xiaomi_10D1" key=clear folder=C:\PS
Xuất tất cả wireless profile (file XML riêng cho mỗi profile, tên file là SSID):
netsh wlan export profile key=clear folder=C:\PS
Copy file XML sang thiết bị Windows khác (triển khai qua GPO) và import WLAN profile cho tất cả user:
netsh wlan add profile filename="C:\PS\home-Xiaomi_10D1.xml" user=all
Hoặc import cho user hiện tại:
netsh wlan add profile filename="C:\PS\home-Xiaomi_10D1.xml" user=current
Kể từ đó, nếu mạng Wi-Fi đã import nằm trong phạm vi card không dây, Windows tự kết nối.
Quên (xóa) mạng Wi-Fi đã lưu trên Windows 10
Xóa mạng Wi-Fi đã lưu kèm mật khẩu trong Settings. Mở Settings → Network & Internet → Wi-Fi → Manage known networks.
Danh sách wireless profile đã dùng. Chọn SSID muốn xóa → Forget.
Cũng xóa (quên) WLAN profile từ CMD dùng netsh. Chỉ định tên profile, ví dụ:
netsh wlan delete profile name="Rt2253"
Profile "Rt2253" is deleted from interface "Wireless network".
Xóa tất cả mạng Wi-Fi đã lưu một lần:
netsh wlan delete profile name=*