Quick Tip: Change the Windows User Password via Command Line

Windows-tip Are you an administrator on the Windows operating system with multiple user accounts? Have you forgotten the password to one of those accounts and you are locked out? Then, provided you are the administrator, you can reset the password from the command line.

To open the Windows command line, just go to your start menu then choose “run” (or press your Windows key and then press R). Then in the box that pops up, type cmd and press enter.

In the black box that comes up, type net user then enter. This will give you a list of all your Windows accounts on that computer.

To change the password for one of these accounts is very simple. Say the Windows account name is asks and you want to change the password to mypa$$word then you just need to type the following :

    net user asks mypa$$word

Windows Command Prompt - Change Password

After pressing enter, you should then get a message saying “the command completed successfully”. That means the password has now been changed and you can now log into that account.

(By) Mark O’Neill is a blogger, writer and English tutor. Check out his blog at BetterThanTherapy.net

Tagged:

Mark O'Neill

Mark O'Neill is the managing editor of MakeUseOf.com

Similar Stuff

The comments were closed because the article is more than 90 days old.

If you have any questions related to stuff mentioned in the article or need help with any computer issue, just ask it on MakeUseOf Answers.

  • http://makeuseof.com Aibek

    “TO THE EARLIER COMMENTER”

    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 … :-(

  • Sasha

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

    • Mutkau817

      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

  • TimB

    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.

  • calin

    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!