How can I change password for multiple credentials in Windows Vault (a.k.a. Credential Manager)?

9

5

My Windows 7 laptop is not joined to my company's Active Directory domain. However, I connect to a number of resources on the domain, including intranet sites, file shares, and TFS. Every three months, my company makes me change my password.

I've discovered that Windows 7 has a Credential Manager where I can go in and edit stored passwords. However, by the time I change my password I have at least a dozen different credentials to edit. Note that each credential has the same "domain\user" format user name.

Is there a way to change the password for every credential with the same user name?

I think the problem is more acute with file shares and TFS, where I seem to just get denied access. With intranet sites I at least get prompted by Internet Explorer to change my password (albeit repeatedly for each one I access).

Marc Stober

Posted 2012-01-20T14:55:38.523

Reputation: 195

2Could you just add a domain credential for *.companydomain.tld? I'm sure Windows supports this. – user1686 – 2012-01-20T15:16:51.513

@grawity yes - that works! If you put this as answer I'll give you credit. Thanks. – Marc Stober – 2012-04-17T14:05:41.207

Answers

7

For completeness, you can manage credentials at the command line or in batch script with cmdkey.exe (located in %windir%\system32).


For example, to add (or update) the credentials on server.domain.tld:

cmdkey.exe /add:server.domain.tld /user:username /pass:password

or for the entire domain:

cmdkey.exe /add:*.domain.tld /user:username /pass:password


/user can also take domain\username or username@domain


Instead of opening Windows Vault you could run a simple batch script that would prompt you for your new password:

set /p pw=Enter your new password:
cmdkey.exe /add:*companydomain.tld /user:myusername /pass:%pw%

agentnega

Posted 2012-01-20T14:55:38.523

Reputation: 613

4

If anyone is interested in reading and writing to it from PowerShell or C#, here's a link to a script that does it:

PowerShell Credentials Manager: CredMan.ps1

The PowerShell script accesses the API via inline C# that utilizes Pinvoke.

Tim Lewis

Posted 2012-01-20T14:55:38.523

Reputation: 203