Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
up vote 13 down vote accepted

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
share|improve this answer
Exactly what I'm looking for. Thank you! – Nam G VU Dec 17 '13 at 8:40
welcome by the way :) – Kirk Dec 17 '13 at 8:47

Sure, but it depends on how many 'targetnames' you have.

cmdkey /delete:Administrator && cmdkey /delete:Knuckle-Dragger
share|improve this answer
As in my OP, I want to delete all. – Nam G VU Dec 17 '13 at 8:35

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.