Computer >> บทช่วยสอนคอมพิวเตอร์ >  >> ระบบเครือข่าย >> ความปลอดภัยเครือข่าย

วิธีหา Network Security Key (รหัสผ่าน Wi-Fi) ใน Windows 8/8.1 ผ่าน Command Prompt (CMD)

ค้นหา Wi-Fi Password (Network Security Key) ใน Windows 8/8.1 ด้วย CMD

Windows 8/8.1 ไม่มี Settings App แบบ Windows 10/11 ใช้ Command Prompt (Admin) หรือ Network and Sharing Center เป็นหลัก

วิธีที่ 1: Command Prompt (CMD) - แนะนำ เร็วและแม่นยำ

  1. กด Win + X → เลือก Command Prompt (Admin) หรือ Windows PowerShell (Admin)
  2. พิมพ์คำสั่งแสดง Profile ทั้งหมด:
    netsh wlan show profiles
    
  3. จดชื่อ SSID (Profile Name) ที่ต้องการ (เช่น HomeWiFi)
  4. พิมพ์คำสั่งแสดงรหัสผ่าน (แทน HomeWiFi ด้วยชื่อจริง):
    netsh wlan show profile name="HomeWiFi" key=clear
    
  5. ในผลลัพธ์ หาบรรทัด Key Content → นั่นคือ Network Security Key (Wi-Fi Password)

ตัวอย่าง Output:

Profile HomeWiFi on interface Wi-Fi:
=======================================================================
Applied: All User Profile
Profile information:
    Version                : 1
    Type                   : Wireless LAN
    Name                   : HomeWiFi
    ...
Security settings:
    Authentication         : WPA2-Personal
    Cipher                 : CCMP
    Authentication         : WPA2-Personal
    Cipher                 : GCMP
    Security key           : Present
    Key Content            : MyS3cur3P@ssw0rd2024!

วิธีที่ 2: Network and Sharing Center (GUI)

  1. คลิกขวาไอคอน Network/Wi-Fi ใน System Tray → Open Network and Sharing Center
  2. คลิก Change adapter settings (ซ้าย)
  3. คลิกขวา Wi-Fi (หรือ Wireless Network Connection) → Status
  4. คลิก Wireless Properties
  5. แท็บ Security
  6. ติ๊ก Show characters
  7. รหัสผ่านแสดงในช่อง Network security key

วิธีที่ 3: PowerShell One-Liner (Export ทั้งหมด)

(netsh wlan show profiles) | Select-String ":\s(.+)$" | ForEach-Object { $_.Matches.Groups[1].Value.Trim() } | ForEach-Object { netsh wlan show profile name="$_" key=clear } | Select-String "Key Content"

กรณีพิเศษและ Troubleshooting

❌ "The Wireless AutoConfig Service (wlansvc) is not running"

net start wlansvc
# หรือ Services.msc → WLAN AutoConfig → Start (Automatic)

❌ "There is no wireless interface on the system"

  • Desktop PC ไม่มี Wi-Fi Card / ไม่ได้ติดตั้ง Driver
  • Laptop: Fn + F2/F3/F12 (Wi-Fi Toggle) / Airplane Mode Off / BIOS Wi-Fi Enabled

❌ ไม่แสดง Key Content / แสดง "Absent"

  • Profile เป็น Per-user ไม่ใช่ All User → ลองรัน CMD/User Context เดียวกับที่สร้าง Profile
  • Enterprise Wi-Fi (WPA3-Enterprise/EAP-TLS/PEAP) → ไม่เก็บ PSK ใช้ Certificate/Username+Password
  • Profile ถูกลบ/Corrupt → Connect ใหม่แล้วลองอีกครั้ง

❌ Access Denied

  • ต้อง Run as Administrator
  • UAC Block → Right-click CMD → Run as Administrator

คำถามที่พบบ่อย

Network Security Key = Wi-Fi Password ไหม?

ใช่ คำเรียกทางการของ Windows สำหรับ WPA/WPA2/WPA3 Pre-Shared Key

Windows 8.1 End of Life (Jan 2023) ยังใช้ได้ไหม?

ใช้ได้ แต่ ไม่ได้รับ Security Update แล้ว ควร Upgrade Windows 10/11 หรือ Linux (Linux Mint, Ubuntu, Fedora) เพื่อความปลอดภัย

ดู Password บนโทรศัพท์ Android/iPhone ได้ไหม?

  • Android 10+: Settings > Wi-Fi > ⚙️ > Share > QR + Password
  • iOS 16+: Settings > Wi-Fi > (i) > Password > FaceID
  • macOS: Keychain Access > System/iCloud > Passwords > Show Password

สรุป

Windows 8/8.1: CMD Admin → netsh wlan show profiles → netsh wlan show profile name="SSID" key=clear → ดู Key Content หรือ GUI: Network and Sharing Center → Adapter Status → Wireless Properties → Security → Show characters