Skip to content

Instantly share code, notes, and snippets.

@mansouryaacoubi
Created December 6, 2018 21:30
Show Gist options
  • Save mansouryaacoubi/0d44bda2904f016bb7da3cce7d554940 to your computer and use it in GitHub Desktop.
Save mansouryaacoubi/0d44bda2904f016bb7da3cce7d554940 to your computer and use it in GitHub Desktop.
Retrieve saved WiFi Password from PC
@echo off
cls
IF [%1] == [] GOTO SETVAR
SET SSID=%1
GOTO START
:SETVAR
SET /P SSID="Please enter SSID (in quotation mark): "
IF [%SSID%] == [] GOTO SETVAR
GOTO START
:START
FOR /F "tokens=2* delims= : %%A IN ('netsh wlan show profile name="%SSID%" key=clear') DO echo %%B
pause
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment