Retrieving password from Windows Credential Manager using CMD

13,481

"How can I retrieve the testUser password?"

This is not possible using cmdkey.

Reference cmdkey:

Create, list or delete stored user names, passwords or credentials.

...

Once stored, passwords are not displayed.

Share:
13,481
Benjamin
Author by

Benjamin

I hope you like getting it, as much as I love giving it...

Updated on July 08, 2022

Comments

  • Benjamin
    Benjamin almost 2 years

    I am trying to add and retrieve credentials from Windows Credential Manager using a command prompt.

    To add a new credential, I have the command like below and it works perfectly:

    cmdkey /add:testTarget /user:testUser /pass:testPassword
    

    However, when I try to retrieve the credentials, which I have added earlier (testTraget) using CMD, I am unable to get the password using the command below:

    cmdkey /list:testTarget
    

    The command only returns the Target(testTarget),Type(Domain Password), and the Username(testUser)

    How can I retrieve the testUser password?

    I know this is possible in Mac OS using Bash and keychain.