How to Change the Windows Password via Command Line With Net User

Ben Stegner Updated 04-12-2019

Changing the user password is simple in Windows with the net user command. It’s also the fastest way. But you have to use the Windows Command Prompt.


It might scare new users, but the Command Prompt is great for quickly doing common tasks. Next time you want to change a password on your PC, try this method.

Use the Net User Command to Change the Windows Password

To change a Windows user password via the command line, you need to run the net user command tool:

  1. Open an administrator Command Prompt (assuming you have administrator privileges). To do this, type cmd into the Start Menu. Right-click on the Command Prompt entry and choose Run as administrator.
  2. Type the following “net user” command and press Enter to list all the users on your system:
    net user

    Take note of the account name you want to change the password for.

  3. To change the password, type the “net user” command shown below, replacing USERNAME and NEWPASS with the actual username and new password for the account. Further, if the username is more than one word, you’ll need to place it inside quotes:
    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.

NET USER command to change the Windows password via the CMD.exe prompt.

For extra security, you can use a slightly different command to prevent the new password from appearing on-screen. Type net user USERNAME * and Windows will ask you to type a new password twice. However, it doesn’t appear as you type, making sure anybody nearby cannot see it.

If you see an Access denied message, make sure that you started the Command Prompt as an Administrator. Standard users can’t change the password for other users.


And if you’ve lost the administrator password, follow our tips for resetting a lost Windows admin password Lost Your Windows Administrator Password? Here's How to Fix It Looking for the default administrator password in Windows? Need to recover your account password? Here's how to do it. Read More .

Related topics: Command Prompt, Password Recovery, Windows Tips.

Affiliate Disclosure: By buying the products we recommend, you help keep the site alive. Read more.

Whatsapp Pinterest

Leave a Reply

Your email address will not be published. Required fields are marked *

  1. akram.aku
    October 17, 2019 at 11:29 am

    The password does not meet the password policy requirements. Check the minimum password length, password complexity and password history requirements.

  2. Million_dollar_guy_._
    July 20, 2019 at 1:55 am

    It shows an error "ACCESS DENIED"........Is it possible to change password just through command prompt, if it is like that then anyone could change my password by accessing it physically.

  3. Pdn Sanam
    June 10, 2019 at 6:05 am

    Nice Post.

  4. saad
    May 20, 2019 at 3:12 pm

    My PC show the new password what I can do after do this how I change password

  5. Password Armor
    May 16, 2018 at 6:10 am

    nice post

  6. Sammy B
    March 31, 2017 at 10:14 pm

    How about 1 or 2, I think 2 is true if some user have more than 1 empty space
    1. net user Some User userpass
    2. net user "Some User" userpass

  7. Kishore Negi
    July 21, 2016 at 6:05 am

    Anyone can give me solution of my query???

    how to reset bulk user's password ? (50 No's of user in one time)

  8. Kdjfhd irndkdm,d
    June 6, 2016 at 7:22 pm

    Thanks I was actually able to create an account and make it Admin through this process at the welcome screen by replacing the sticky keys function with cmd

  9. Anonymous
    October 15, 2015 at 2:50 pm

    Also if the username is more than 1 word you can toss "John Doe" for user to clear that up. I didn't see anyone mention that. Just put it in quotes

    • Anonymous
      October 15, 2015 at 3:06 pm

      Example: net user "John Doe" password

      • Bernie
        November 7, 2016 at 12:12 am

        Thank you so much for mentioning the quotes!!

    • Promise
      January 21, 2017 at 7:18 pm

      Your quotes comment really saved me

  10. calin
    October 29, 2009 at 1:31 pm

    Your post is great! I have a Windows 2008 server (administrated remotely) and after I had uninstalled the active directory all my users were deleted and seems that also the password for administrator user was messed up. So because we have a service which runs a nant build system I've put the command to reset the password into nant script with tag. Now I can log in again to my server.
    Thank you for your post!

  11. TimB
    August 20, 2008 at 8:32 pm

    Cool... Exactly what I needed to know just now.

    I have to reset the local admin passwords on all our PCs, and this will make scripting it dead easy.

  12. Sasha
    February 17, 2008 at 9:44 pm

    You know an even easier way to change/reset user passwords? start > run > control userpasswords2.

    • Mutkau817
      January 17, 2009 at 5:01 pm

      that only works if you already know the password for the account. This is useful if you forgot the password, or need to get into an account you normally do not have access to

    • Password Armor
      May 16, 2018 at 6:11 am

      right info

  13. Aibek
    February 17, 2008 at 8:51 pm


    I am pretty sure I had approved your comment earleir but for some reason it's not here. :? I must have mistakenly set it to 'delete' instead of 'approve'. Sorry ... :-(