Reset a Windows 10 password with CMD

requirement = installation Disk of any windows 7,8,8.1,10

boot into the boot disk. instead of install we will select repair.

then go to trouble shoot options. search for cmd

when you find it. launch it. by default cmd will open to a directory name x:> we will need to change that to the drive where windows is installed. to do this do the following
type in    c:
this will get us into C drive. type in dir to list all the content. if the list doesn’t show the items of Windows partition. you are not in the right drive. change the drive, D: or E: do this until you find the drive.

now we will move to the the system32 folder cd windows\system32 when we get here. rename the osk.exe file to osk.old. to do this run the follwing command.

rename osk.exe osk.old

now rename cmd.exe to osk.exe
same as above
rename cmd.exe osk.exe

As per design when we are on the login screen of windows there is a on screen keyboard (osk.exe) available to us. by following the above steps we have just replaced that keyboard with command prompt.

now restart and boot into the system (not the boot disk). when we are on the login screen with the user account to which we forgot the password.

open the accessibility option and click on on screen keyboard. which will launch cmd.exe

to list all users of the system :

net user

when we know the actual username of the account we want to change password.

net user [USERNAME] *

[USERNAME] refer to the account whose password we are trying to change.

if you are planning to change password and enable the built in administrator
net user administrator /active:yes
is a compulsory step.

after running the above command a new password prompt is shown. assign a new password for the account. close the cmd. and use the new pass to login.

after this don’t forget to change everything as they were.

to do this; boot into the os-disk and undo all the changes.

rename osk.exe cmd.exe
rename osk.old osk.exe

deactivate the built in administrator if you no longer need it.

thats all!

Responses

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

  1. Charles Avatar

    PCUnlocker and Kon-Boot can make the password reset easier.

    Like

    1. bbbb Avatar

      konboot does not always work, in fact most of the time it does not

      Liked by 1 person