Skip to content

Instantly share code, notes, and snippets.

@quickstep25
Created April 10, 2025 01:43
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