Skip to content

Instantly share code, notes, and snippets.

@tomfanning
Last active November 28, 2025 21:51
Show Gist options
  • Select an option

  • Save tomfanning/77f20a1bb50055e915f4 to your computer and use it in GitHub Desktop.

Select an option

Save tomfanning/77f20a1bb50055e915f4 to your computer and use it in GitHub Desktop.
Batch file to clear all credentials from Windows Credential Manager
@echo off
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
echo All done
pause
@IntuneMaster
Copy link

for /F "tokens=1,* delims= " %G in ('cmdkey /list ^| findstr Adobe') do cmdkey /delete %H

Not working for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment