Delete all windows credentials from credential manager

Rack of servers and network equipment in a server room

If you have built up a list of Windows credentials that you want to clear all at once, instead of having to remove them one by one try this command:

cmdkey /list | ForEach-Object {if ($_ -like “Target:“) {cmdkey /del:($_ -replace ‘^.+=’, ”)}}

Practical IT tips, straight to your inbox

Microsoft 365 updates, security alerts and plain-English tech advice for small businesses, emailed when we publish a new article.

We don’t spam! Read our privacy policy for more info.