Windows อนุญาตให้บันทึกรหัสผ่านที่ใช้เชื่อมต่อ Wi-Fi Networks ไว้ ด้วยเหตุนี้ หาก Known Wi-Fi Network อยู่ใน Range ของ Wireless Network Adapter ของคุณ Windows จะเชื่อมต่ออัตโนมัติโดยไม่ต้องถามรหัสผ่าน ในบทความนี้เราจะแสดงวิธีดึง Saved Passwords สำหรับ Wi-Fi Networks บน Windows 10 ส่งผ่านรายการ Wireless Networks ที่บันทึกพร้อม Security Keys ไปยังคอมพิวเตอร์อื่น และวิธี Remove (Forget) WLANs เฉพาะเจาะจง
วิธีหา Current Wi-Fi Password บน Windows 10
หากอุปกรณ์ Windows 10 ของคุณเชื่อมต่อกับ Wi-Fi Network อยู่ คุณสามารถดู Password (Security Key) ได้ผ่าน Control Panel:
- คลิก Start -> Settings -> Network & Internet -> Status -> Network and Sharing Center -> Change adapter settings; เพื่อเปิด Network Connections Window ทันที ใช้คำสั่ง
ncpa.cpl - Right-click Wireless Network Adapter ของคุณ และเลือก Status;

- ไปที่แท็บ Security และติ๊ก Checkbox "Show characters";
- Security Key (Password) ของ Wi-Fi Network ที่เชื่อมต่ออยู่ (Active) ระบุอยู่ในฟิลด์ "
Network security key"

แสดงรายการ Saved Wi-Fi Passwords บน Windows 10 ด้วย Command Prompt
ข้างต้นเราแสดงวิธีได้ Password ของ Current Wi-Fi Connection บน Windows 10 อย่างไรก็ตาม คุณสามารถดู Password ของ Wireless Network ใดๆ ที่อุปกรณ์ของคุณเคยเชื่อมต่อมาก่อนหน้านี้ได้ ข้อมูลนี้มีให้เฉพาะใน Command Prompt โดยใช้ Built-in Tool netsh
เมื่อคุณเชื่อมต่อกับ Wi-Fi Network Windows จะสร้าง WLAN Profile สำหรับมัน ซึ่งมี Network Name (SSID), Password (Security Key) และ Wi-Fi Security Options บางอย่างที่ใช้เชื่อมต่อกับ Wireless Access Point คุณสามารถแสดงรายการ Saved WLAN Profiles ได้ด้วยคำสั่ง:
netsh wlan show profile

เพื่อดูข้อมูลเกี่ยวกับ WLAN Profile เฉพาะเจาะจงและ Password ที่บันทึกไว้ คุณต้องระบุ SSID ของมัน เช่น:
netsh wlan show profile "Xiaomi_10D1" key=clear

Profile Xiaomi_10D1 on interface Wi-Fi: ======================================================================= Applied: All User Profiles Profile information -------------------------- Version: 1 Type: Wireless LAN Name: Xiaomi_10D1 Control options: Connection mode: Connect automatically Network broadcast: Connect only if this network is broadcasting AutoSwitch: Do not switch to other networks MAC randomization: Disabled Connectivity settings --------------------- Number of SSIDs: 1 SSID name: "Xiaomi_10D1" Network type: Infrastructure Radio type: [ Any Radio Type ] Vendor extension: Not present Security settings ---------------------- Authentication: WPA2-Personal Cipher: CCMP Authentication: WPA2-Personal Cipher: Unknown Security key: h33K3*d2 Cost settings ------------- Cost: Unrestricted Congested: No Approaching Data Limit: No Over Data Limit: No Roaming: No Cost Source: Default
Saved Wi-Fi Password ระบุอยู่ในฟิลด์ Security key
Windows บันทึก Wi-Fi Network Profiles ไว้ที่โฟลเดอร์ %ProgramData%\Microsoft\Wlansvc\Profiles\Interfaces
แสดง Saved Wi-Fi Passwords ทั้งหมดด้วย PowerShell
ใช้ PowerShell คุณสามารถแสดงรายการ Saved Network SSIDs และ Passwords ทั้งหมดได้ นี่คือ PowerShell One-liner สำหรับแสดง Passwords ของ WLAN Profiles ทั้งหมดบน Windows 10:
(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

เพื่อ Dump Wi-Fi Passwords ทั้งหมดของ WLAN Profiles ไปยัง Text File บน Desktop ให้เพิ่ม Pipe ไปท้ายคำสั่งก่อนหน้า:
| Format-Table -AutoSize | Out-File $env:USERPROFILE\Desktop\SavedWiFiPass.txt
วิธี Export และ Import WLAN Profiles บน Windows 10
คุณสามารถ Export WLAN Profile Settings ที่บันทึกไว้พร้อม Wi-Fi Network Security Key ไปยัง XML File และ Import ไปยังคอมพิวเตอร์อื่นได้
เพื่อ Export WLAN Profile ใช้คำสั่งนี้:
netsh wlan export profile name="Xiaomi_10D1" key=clear folder=C:\PS
หรือคุณสามารถ Export Saved Wireless Profiles ทั้งหมดได้ (สร้าง XML File แยกสำหรับแต่ละ Profile พร้อม Network SSID เป็นชื่อ):
netsh wlan export profile key=clear folder=C:\PS

จากนั้นคุณสามารถ Copy XML Files ที่มี Configured Wireless Profiles ไปยัง Windows Device อื่น (หรือ Deploy Files โดยใช้ GPO) และ Import Saved WLAN Profiles สำหรับ Computer Users ทั้งหมดโดยใช้คำสั่งด้านล่าง:
netsh wlan add profile filename=" "C:\PS\home-Xiaomi_10D1.xml" user=all
หรือ Import Saved Wi-Fi Network ให้ Current User เท่านั้น:
netsh wlan add profile filename=" "C:\PS\home-Xiaomi_10D1.xml" user=current
ตอนนี้ หาก Imported Wi-Fi Networks ใดๆ อยู่ใน Range ของ Wireless Adapter ของคอมพิวเตอร์ Windows จะเชื่อมต่ออัตโนมัติ
วิธี Forget Saved Wi-Fi Network บน Windows 10
คุณสามารถลบ Saved Wi-Fi Network พร้อม Password ใน Windows Settings ได้ เปิด Settings -> Network & Internet -> Wi-Fi -> Manage known networks

คุณจะเห็นรายการ Saved Wireless Profiles ของ Networks ที่เคยใช้ เลือก SSID ของ Network ที่ต้องการลบ และคลิก Forget

คุณยังสามารถ Remove (Forget) Saved Wi-Fi Network จาก Command Prompt โดยใช้ netsh ได้ ระบุชื่อ WLAN Profile ที่ต้องการลบ เช่น:
netsh wlan delete profile name="Rt2253"

Profile "Rt2253" is deleted from interface "Wireless network".
หากต้องการลบ Saved Wi-Fi Networks ทั้งหมดทีเดียว ให้รันคำสั่ง:
netsh wlan delete profile name=*