Forked from tomfanning/clear-credential-manager.cmd
Created
February 26, 2024 21:05
-
-
Save charl3y15/76ab735bf2e5df8e82c35fcde0d80e6d to your computer and use it in GitHub Desktop.
Batch file to clear all credentials from Windows Credential Manager
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment