How can I change password for multiple credentials in Windows Vault (a.k.a. Credential Manager)?
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%
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.