Friday 6 July 2018

Get Stored Password Powershell

Some Useful Commmand Prompt Commands

ipconfig/flushDNS
Del /S "%LOCALAPPDATA%\*.auc " /q
Del /s "%LOCALAPPDATA%\temp\*.*" /q
Del /s /q %systemdrive%\$Recycle.bin
Del /F /Q %APPDATA%\Microsoft\Windows\Recent\*
Del /F /Q %APPDATA%\Microsoft\Windows\Recent\AutomaticDestinations\*
Del /F /Q %APPDATA%\Microsoft\Windows\Recent\CustomDestinations\*

REG ADD "HKCU\SOFTWARE\Microsoft\Windows\Shell\Bags\1\Desktop" /V FFLAGS /T REG_DWORD /D 1075839521 /F

---------------------------------------Power Shell Script to fetch Stored Password---------------------------
(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 -AutoSize
pause
---------------------------------------Save as xxx.ps1-----------------------------------------------------------

No comments:

Post a Comment