Cmdkey Command In Windows Server 2008

In this article I am going to explain about Cmdkey command in Windows Server 2008 and also explain it's related syntax.
  • 2942


Cmdkey command lets you manage the stored username and passwords or credentials from Windows Credentials Manager. Though you can crate, display or removes the stored user names and passwords. Cmdkey is Windows Server 2008 command line tool and it is available in Windows Server 2008 and Windows Vista.


cmdkey [{/add:<TargetName>|/generic:<TargetName>}] {/smartcard|/user:<UserName> [/pass:<Password>]}
[/delete{:<TargetName>|/ras}] /list:<TargetName>

In above syntax

Parameters of Cmdkey command Description
/add: <TargetName> Add a user name and password for a user to access a server or computer.
/generic: <TargetName> Add generic credentials to the lists to access the server or computer.
/smartcard Access the credentials from smart card.
/user: <UserName> Defines the user or account name to store the information. This parameter is necessary otherwise it will be requested.
/pass:<Password> Defines the password to be stored. If this parameter is not passed, it will be requested.
/delete{: <TargetName> | /ras} Deletes a user name and password from the list.
/list: <TargetName> Displays the list of stored user names and credentials.

Examples of cmdkey command

1.Display the list of username and credentials.

cmdkey /list

2.Add a user name and password for a user to access a server/computer:

cmdkey /add: server /user: Albert  /password: Nike

Ask Your Question

Got a programming related question? You may want to post your question here

Programming Answers here


More Articles

© 2020 DotNetHeaven. All rights reserved.