Windows 7 – Command-Line to Remove All Saved Passwords in Credential Manager

command linecredentials-managerpasswordsSecuritywindows 7

We can remove remembered/cached passwords via Credential Manager as here and via a command cmdkey as here.

I want to have one command that quickly clear all the passwords. How can we do that?

Best Answer

for that, you sure need to create a batch file. maybe follwing link will help you on this

This is the similar post. Try it out.

The script

cmdkey.exe /list > "%TEMP%\List.txt"
findstr.exe Target "%TEMP%\List.txt" > "%TEMP%\tokensonly.txt"
FOR /F "tokens=1,2 delims= " %%G IN (%TEMP%\tokensonly.txt) DO cmdkey.exe /delete:%%H
del "%TEMP%\List.txt" /s /f /q
del "%TEMP%\tokensonly.txt" /s /f /q
Related Question