How to add, view, delete users in Credential Manager with Command Prompt

Yes, you can manage network user information stored in Credential Manager using Command Prompt, and here's how.

Windows 10 cmdkey command
Windows 10 cmdkey command

On Windows 11 and Windows 10, Credential Manager is a legacy feature available through Control Panel designed to store sign-in information for websites, apps, and network services (such as shared folders and printers), so you do not have to repeat the credentials in the future.

Although you can store and manage network user information with Credential Manager, it’s also possible to use Command Prompt to add, remove, and view credentials. Usually, this will be helpful when you are building a script, or you are the type that is always working with commands.

In this guide, you will learn the steps to add, remove, and view network user information from Credential Manager using Command Prompt on Windows 10 and Windows 11.

Add network credentials with Command Prompt

To use Command Prompt to add network credentials to Windows 11 or 10, use these steps:

  1. Open Start.

  2. Search for Command Prompt, right-click the top result, and select the Run as administrator option.

  3. Type the following command to add a network user and password to Windows and press Enter:

    cmdkey /add:COMPUTER-OR-DOMAIN /user:COMPUTER-OR-DOMAIN\USERNAME /pass:PASSWORD

    In the command, replace COMPUTER-OR-DOMAIN with the target computer, IP address, or domain, COMPUTER-OR-DOMAIN\USERNAME for the target device and username, and PASSWORD for the account password.

    This example creates an entry in Credential Manager for the “admin01” user available in the target computer:

    cmdkey /add:office-pc /user:office-pc\admin01 /pass:password

    cmdkey add command

Once you complete the steps, the user information will store in the Credential Manager.

Remove network credentials with Command Prompt

To remove a network user information from Credential Manager with Command Prompt, use these steps:

  1. Open Start.

  2. Search for Command Prompt, right-click the top result, and select the Run as administrator option.

  3. Type the following command to remove a network user from Credential Manager and press Enter:

    cmdkey /delete:COMPUTER-OR-DOMAIN

    In the command, replace COMPUTER-OR-DOMAIN for the name of the target computer, IP address, or domain storing the credentials.

    This example deletes the user credentials for the target device called “office-pc”:

    cmdkey /delete:office-pc

    cmdkey remove command
    cmdkey remove command

View network credentials with Command Prompt

To view all the network users stored in Credential Manager with Command Prompt, use these steps:

  1. Open Start.

  2. Search for Command Prompt, right-click the top result, and select the Run as administrator option.

  3. Type the following command to view a list of credentials and press Enter:

    cmdkey /list

    cmdkey list command

  4. (Optional) Type the following command to view a list of credentials from a specific computer and press Enter:

    cmdkey /list:COMPUTER-NAME

    In the command, replace COMPUTER-NAME for the name of the target computer, IP address, or domain storing the credentials.

    This example lists the entries for the target computer called “office-pc”:

    cmdkey /list:office-pc

    cmdkey list computer command

When using this command, you can also see the basic details, such as username, type, target device, etc. You can never view the password by design on Windows 11 or Windows 10.

About the author

Mauro Huculak is a Windows How-To Expert who started Pureinfotech in 2010 as an independent online publication. He has also been a Windows Central contributor for nearly a decade. Mauro has over 15 years of experience writing comprehensive guides and creating professional videos about Windows and software, including Android and Linux. Before becoming a technology writer, he was an IT administrator for seven years. In total, Mauro has over 21 years of combined experience in technology. Throughout his career, he achieved different professional certifications from Microsoft (MSCA), Cisco (CCNP), VMware (VCP), and CompTIA (A+ and Network+), and he has been recognized as a Microsoft MVP for many years. You can follow him on X (Twitter), YouTube, LinkedIn and About.me. Email him at [email protected].