Skip to content

Instantly share code, notes, and snippets.

@quickstep25
Created April 10, 2025 01:43
Show Gist options
  • Save quickstep25/a980bc46899a2ee9573e79a458a47aee to your computer and use it in GitHub Desktop.
Save quickstep25/a980bc46899a2ee9573e79a458a47aee to your computer and use it in GitHub Desktop.
PowerShell script to remove all the cached credentials in Windows Credential Manager.
$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