08.02.2012 in Home > Random > Windows by Namit Gupta

How to Reset / Change Windows Password from Command Line

This must be the easiest way to change windows user password. You just need to have access to the command prompt with administrator rights and you can instantly change the windows password with a single line command.

Using the traditional method of changing windows password which is by going to ‘user account’ settings inside control panel, you need to provide the new password with the current windows password as well. The command line method does not require you to enter the current user password.

You may also like – How to Retrieve Lost Windows Password

How To Change or Reset Windows Password using Command Prompt

Goto All Programs -> Accessories -> Command Prompt (Right click and select ‘Run as administrator’ from the pop-up menu)

change-windows-password

Now enter the following command in the command prompt

net user [space] 'Account Name' [space] 'New Password'

Example -

net user NamitGupta helloworld

Note: username and password both are case-sensitive.

windows-password-command-line

If you entered everything correctly, you will get “The command completed successfully” on your screen on successful execution of the command.

Update: This trick may work with windows 7 only.

[via]