I recently saw a post from someone that had upgraded to Windows 10 and they were lamenting that they had lost some of the saved passwords that Windows had stored. There’s not a man, woman, or dog alive that enjoys typing usernames or passwords. And these days it’s just irresponsible to have a simple password, or the same password for every site you go to. So now you have the burden of remembering them and typing them. Ain’t nobody got time for that! The best solution is to use a Password Manager, of course. I use Password Vault Manager, but there are a bunch of great options out there. It’s just good sense to use one.
But what if you don’t have one and you’re getting ready to upgrade, or do a new install, or I’ve convinced you of the merits of a Password Manager and you want to start moving into one? Do you have to remember all the sites and usernames and passwords? Well, probably not. Windows Control panel gives you a glimpse into the private life of Credentials. Go to the Start Screen and type “Credentials.” That will bring up the Windows Credential Manager.
It will list all the websites that it has saved passwords for. The passwords are hidden by default. You may have to authenticate the first time you click “Show.” For obvious reasons I’m not going to show too much of my own credential store. I don’t need you jokers signing in to my MSDN account and posting “I love Developers” to the MSDN forums.
So if you’re concerned about losing usernames or passwords, you can go into the Credential Manager and copy them out. Great, right? No, not great. So much copying and pasting. So much clicking of “Show.” There must be a better way!
There is…PowerShell.
First, let me say I did not write this code. Someone smarter than me did and I copied it down. If you’re the author of this code, let me know.
This snippet of PowerShell will list out all of the entries in the Credential Manager in an easy to copy and paste manner. Now, obviously, since this is a list of every web site, username, and password you have, be very,very careful with this.
Here is the code:
[void][Windows.Security.Credentials.PasswordVault,Windows.Security.Credentials,ContentType=WindowsRuntime]
$vault = New-Object Windows.Security.Credentials.PasswordVault
$vault.RetrieveAll() | % { $_.RetrievePassword();$_ }
Again, I can’t take credit for this. Thanks to whoever did write it.
I hope this helps some folks recover usernames and passwords, before it’s too late.
tk
ShortURL: http://www.toddklindt.com/POSHGetPasswords