How to force reset the Active Directory Domain Administrator password
Published June 25, 2022 by Danny Moran
Table of Contents
Introduction
This is a step-by-step guide for force resetting the Active Directory Domain Administrator password.
How to force reset the Active Directory Domain Administrator password video
How to force reset the Active Directory Domain Administrator password guide
Mount the Windows Server installation media to your domain controller virtual machine or physcal server.
Restart the server and then boot into the installation media.
On the first page of the Microsoft Server Operating System Setup wizard, select Next.
On the second page, press Repair your computer which is located at the bottom left of the screen.
In the Windows repair wizard, press Troubleshoot, and then Command Prompt
Within the command prompt wizard, run the following command to launch DiskPart.
diskpart
Within DiskPart, run the following command to list all available volumes connected to the server.
list volume
Identify which volume your Windows install is on by using the size column.
Run the following command to select that volume. (replace 1 with the volume number of your windows server install)
select volume 1
Run the following command to assign that volume the driver letter C.
assign letter=c
Run the list volume command again to check the drive letter was assigned correctly
list volume
If the Ltr for the volume shows the drive letter C, then you can close DiskPart by running the following command. If not, return to step 9.
exit
After exiting DiskPart, change to the C directory using the following command.
c:
With the C drive, navigate to the System32 folder.
cd c:\windows\system32
Within the System32 folder, rename the osk.exe file to osk.old. The osk.exe is the file for the On-screen Keyboard.
ren osk.exe osk.old
Copy the PowerShell.exe file to the System32 folder, and name it osk.exe
copy c:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe osk.exe
After the file has been copied, close the Command Prompt window and press continue, to exit and continue to windows server.
Once the Windows Server has booted, press CTRL+ALT+DEL to unlock the server, and then select the Ease of Access button at the bottom right of the screen, and then launch the On-screen Keyboard. If the previous steps have been completed successfully, a PowerShell window should open.
Use the NET USER command to reset the Domain Administrator password.
net user Administrator P@55w0rd123!
Login to your domain controller using the Administrator username, and the new password you have just set.
You can now unlock/create other domain administrator passwords.
Finally, navigate to c:\Windows\System32 and delete the file called osk.exe. (If you want to replace the On-screen Keyboard file, you will need to follow steps 2 to 14 and then run the below command)
ren osk.old osk.exe