Forum Discussion
Credential Manager not updating passwords
Eric Sabono we just started to accept that this could happen. We created a script that clear the cached credentials when a user goes to the Service Desk to get help.
Here is a script i have found and tested to work. I still would like to know why, if my password is reset in AD, and Outlook asks for my new password, why it cant update the existing credentials? if i clear them, it accepts and writes the new value. If i dont, then it continually prompts for credentials even after you type in the new password because it's unable to update the value.
Save this in a txt file and name it PasswordChange.cmd or something with .CMD and execute it before a password change.
For /F "tokens=1,2 delims= " %%G in ('cmdkey /list ^| findstr Target') do cmdkey /delete %%H
- mjedsNov 25, 2020Copper Contributor
Bill Dixon This script essentially wipes everything from CredMgr.
if you are looking for something more specific to just the Outlook creds:
powershell:
clear
$keys = cmdkey /list
ForEach($key in $keys){
if($key -like "*Target:*" -and $key -like "*MS.Outlook*"){
cmdkey /del:($key -replace " ","" -replace "Target:","")
}
} - Eric SaboMay 08, 2019Brass Contributor
Thanks for supplying the script Bill Dixon @Jesper Stein