Thanks to Windows
net user command, you can change your PC user account passwords right from your command prompt window. This lets you set a new password for your chosen account without navigating through the setup menus. We’ll show you how.
RELATED: How to Reset Your Forgotten Password in Windows 10
What to know when changing passwords from the command prompt
net user The command requires administrator access, which means you must use an administrator account to use the command. You can then use it to change passwords for your own account as well as for other people’s accounts.
Also note that this command only allows you to change the password for your local account. If you use a Microsoft account with your PC, you’ll need to use another method to change your password.
RELATED: How to change your Windows password
Use the net user command to change a Windows account password
If you are ready to change the password, first open the “Start” menu. In this menu, search for “Command Prompt”. Then, on the right, select “Run as administrator”.
In the Command Prompt window, type the following command and press Enter. In this command, replace
USERNAME with the username whose password you want to change and
PASSWORD with the new password you want to use.
net user USERNAME PASSWORD
Not sure who is who on your system? You can get a list of all user accounts using the following command in the command prompt:
If your username contains spaces, be sure to enclose it in double quotes. Thereby:
net user "Mahesh Makvana" MYPASSWORD
Are you making these password changes in a public place? People around you (or looking through security cameras) might peek at your password as you type it. In this case, use the following command.
Be sure to replace
USERNAME in the command with the username whose password you want to update.
net user USERNAME *
You will be asked to enter the new password twice, but you will not see any text appear on the screen. Then the command prompt will display a success message indicating that your password has been changed successfully.
And that’s all.
When you now log into your account on your Windows PC, you will use the newly created password. Enjoy!
Want to learn some other useful Windows commands? Consult our dedicated guide.
RELATED: 10 Useful Windows Commands You Should Know