Empty Credential Manager store

We all know, that Windows enables us to save our credentials when we connect to other systems. One example would be Remote Desktop Connection, mstsc.exe. You can choose to save your username and password, so the next time, you can connect more easily. Well these credentials have to be saved somewhere, which can

A) Cause problems when you change your password

B) Present a security risk, since all your passwords are saved on a disk

You can delete these saved credentials by opening Credential Manager from Control Panel and Remove one-by-one. But, if you have many, that is not really an option. So it’s script time:

cmdkey /list | %{ if($_.startswith(”    Target:”)){cmdkey “/delete:$($_.split(‘=’)[1])”} }

This simple one line, run from within PowerShell, will remove all your Windows Credentials entered in your Credential Manager.

Hope it helps you.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s