Need to change a user password in Windows 10 or 11? You can do this through the Settings app, but it's much faster and takes fewer clicks to change a password through the command line instead.

Even if you're new to text commands on Windows, changing the user password with the net user command is simple. We'll show you how to change a Windows password using the command line with this handy method.

Use the Net User Command to Change a Windows Password

To change another Windows user's password via the command line, you need administrator privileges. See how to check if your Windows account is an admin if you're not sure. If you aren't using an admin account because you've lost your administrator password and can't make any changes, follow our tips for resetting a lost Windows admin password.

Also, keep in mind that this method only works for local accounts in Windows 10 and 11. It won't work if you use a Microsoft account to sign in to Windows; you'll need to change the password using Microsoft's web account management page instead. See our guide to securing your Microsoft account for help with this and other security measures.

Now, here's how to change passwords via CMD using net user:

  1. Open an administrator Command Prompt window. To do this, type cmd into the Start menu, then right-click on the Command Prompt entry and choose Run as administrator.
    1. You can also use PowerShell or the Windows Terminal to perform this; you'll find a shortcut to those by right-clicking the Start button or hitting Win + X.
  2. Type the following net user command and press Enter to list all the users on your system. When they appear, take note of the account name you want to change the password for:
            net user
        
  3. To change a password, type the net user command shown below, replacing USERNAME and NEWPASS with the actual username and new password for the account. If the username is more than one word, you'll need to place it inside quotes, as shown:
            net user USERNAME NEWPASS
        
            net user "USER NAME" NEWPASS
        
  4. After you press Enter to run this command, you'll see a message that it completed successfully. Now you can use the new password to log into this account, just like if you had changed it via the graphical interface.
Windows 10 Change Password Net User

If you see an Access denied message when you try this, make sure that you started the Command Prompt (or other command line window) as an Administrator. Standard users can't change the password for other accounts. If you see an error that the username wasn't found, make sure you typed it correctly.

How to Privately Change a Password With Net User

You might want to prevent people around you from seeing the new password that you type when using net user. Thus, for more privacy, you can use a slightly different command to prevent the new password from appearing in plain text onscreen.

To do this, follow the above instructions, but during step 3, enter an asterisk instead of the password. Be sure to still replace USERNAME with the actual username:

        net user USERNAME * 
    

Windows will then ask you to type a new password twice. However, with this method, the passwords don't appear as you type—making sure anybody nearby won't see them.

Change Your Windows Password More Conveniently

Now you know how to use the net user command to change passwords in Windows. It's a quick way to change passwords without sorting through menus, plus you can change multiple passwords in quick succession without your hands leaving the keyboard.

Give it a try next time you need to change a user password. And when you set a new one, make sure to choose a strong password that's not easy to guess or crack.