The Wayback Machine - https://web.archive.org/web/20250401014908/https://www.geeksforgeeks.org/change-windows-pc-password-using-cmd/
Open In App

How to Change Windows Computer Password using CMD

Last Updated : 19 Dec, 2024
Summarize
Comments
Improve
Suggest changes
Like Article
Like
Share
Report
News Follow

If you are a Windows user, one of the easiest ways to change your password is through the Command Prompt (CMD). This is especially helpful for users who prefer command-line tools or face issues accessing the standard settings menu.

In this article, we’ll guide you through the steps to change your Windows password using CMD, along with a few troubleshooting tips.

Prerequisites:

1. Administrative Rights

2. Familiar with the existing User Accounts

3. Backup the unsaved data

Using "net user" Command to Change the Password

Step 1: Open command prompt as Administrator

Go to the Search Menu, type CMD and select "Run as Administrator".

cmd-as-admin
cmd as admin

Step 2: Enter "net user" to fetch Password

net user <username> <newpassword>
Run-as-ADMIN
Run as ADMIN

Step 3: Run the command to change the password

net user [username] [newpassword]

Replace "[username]" with the username of the account whose password you want to change, and "[newpassword]" with the new password you want to set.

Set-password
Set password

Step 4: Reopen to Confirm

Close the Command Prompt and log in with the new password.

Change-password
Confirm to change the password

How to Privately Change a Password using CMD

Use this method to change the password for any particular user. Here's how you can do it:

Step 1: Go to Run & open Command Prompt

Go to the Search Menu, type CMD and select "Run as Administrator".

cmd-as-admin
cmd as admin

Step 2: List All Users to Choose

net user
Run-as-ADMIN
Run as ADMIN

Step 3: Change the password for any particular user

net user USERNAME NEWPASS

If your desired user name has more tan one word then follow this pattern:

For Example: Username - ALPHA GTR

net user "ALPHA GTR" NEWPASS 

Now, what if you're looking to remove a password using Command prompt? Let's see how you can get it done.

Using PowerShell - Additional Method (1)

Step 1: Go to Start and type PowerShell

Step 2: Type the following command to Change the Password

$username = 'UserNameHere'; $password = Read-Host -AsSecureString; net user $username $password

Note: Replace UserNameHere with the desired user account.

Step 3: Close the PowerShell > Restart > Log in

While in "Safe Mode" - Additional Method (2)

Step 1: Restart your PC and hit F8 several times to enter Windows Boot Mode

Step 2: Safe Mode with Command Prompt > net user

net user <username> <newpassword>

Step 3: Exit and Restart as usual

Steps to Remove a Password Using CMD

If you wish to remove the password for any particular account, you can set the password to blank by removing the password in the command line. Let's check it out:

Step 1: Go to Run & open Command Prompt

Go to Search Menu > type CMD > select "Run as Administrator"

Step 2: Run this Command to Remove Password

net user USERALPHA ""

Hence, this will clear your previously saved password for the account - USERALPHA

Tips & Tricks

While using CMD to change your password is usually a reliable method, there are a few common issues users may face:

1. Admin Access: Make sure to have admin access.

Without administration access, you won't be able to perform any of the above-mentioned action.

2. Invalid Username: Do remember the names of user accounts

net user command to list all the exact username.

3. Password Policy Restrictions: Domain restrictions or Specific Password Policies

Make sure the new password meets the system's password requirements.

Conclusion

Changing password in Windows helps in managing and maintaining privacy. By following the different methods and steps, you can easily reset your password or remove it from your Windows 10 or 11.

Also Read

How to Change Windows Computer Password using CMD - FAQs

How do I change my password using CMD in Windows 10?

Step 1: Open Command Prompt with Administrator privileges 

Step 2: Type net user [username] [new password] and press Enter.

  • Replace [username] with your account's username and [new password] with your new password.

  • Your password will be changed instantly.

Can I reset the password for a locked-out account using CMD?

Yes, as long as you have administrative privileges, you can reset the password for any account using the command:

net user TargetUsername NewPassword

Do I need administrative power in Command Prompt to Change the Password?

Yes, you need to open Command Prompt as an administrator user, that will give you administrative privileges and then follow these instructions to change the password.

How to check available user names in the Computer to Change the Computer Password using CMD?

Type the command "net user" into the Command Prompt and press Enter. Names of different account will be displayed on the screen.

How do I remove the password on my Windows account using CMD?

Step 1: Open Command Prompt as Administrator.

Step 2: Type net user [username] * and press Enter.

Step 3: When prompted for the password, press Enter twice without entering anything.


Article Tags :

Similar Reads

three90RightbarBannerImg