cmdkey
CautionStored credentials
cmdkey /list
Lists/edits saved credentials. Stale share or RDP passwords are fixed with /delete.
Examples
cmdkey /delete:srv01Remove stale credentialscmdkey /list:srv01Show credentials for one target onlycmdkey /add:srv01 /user:CORP\taro /passSave credentials with an interactive password promptcmdkey /generic:TERMSRV/srv01 /user:CORP\taro /passSave credentials for Remote Desktoprundll32.exe keymgr.dll,KRShowKeyMgrOpen the stored-credentials dialog
Syntax
cmdkey [/list] [/add:host /user:u /pass] [/delete:host]
Key points
- It manages the same entries as Credential Manager > Windows Credentials.
- After a password change, failed share access or repeated lockouts usually come from an old saved credential.
- It only shows the credentials of the user running it.
When it does not work
- A password typed after /pass stays in the command history. Leave the value off and enter it at the prompt.
Before you run it
Re-authentication required after deletion.
The same reference, with no signal at all
Every command on this site, held on your device. The app adds 632 more: 1,510 commands and 120 fix flows, searchable with no connection. Free to install, no ads (some content is a one-time purchase).
Get it free on the App Store