Created
April 10, 2025 01:43
-
-
Save quickstep25/a980bc46899a2ee9573e79a458a47aee to your computer and use it in GitHub Desktop.
PowerShell script to remove all the cached credentials in 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
$credentials = cmdkey /list | |
foreach ($line in $credentials) { | |
if ($line -match "Target: (.+)") { | |
$target = $Matches[1] | |
cmdkey /delete:$target | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment