If you forgot the administrator password on Windows server, these steps can help you.
This can be implemented on Windows 2012 R2 and later, and still working well on Latest Windows 2022 version.
Boot the server from the Windows Server Installation DVD. When the Setup screen appears, press SHIFT + F10 keys to open Command Prompt.
At the Command Prompt, go to drive where windows was installed. For the example D:\.
if you don’t find the D:\ disk, it might be because the disk hasn’t been assigned the drive letter yet.
You can assign the disk first using the following command:
Diskpart List disk select disk (number -> which the windows was installed) list vol select vole (number -> which the windows was installed assign letter=f
Once you see the windows drive, you can run the following steps:
d: cd Windows\System32 ren Utilman.exe Utilman.exe.original copy cmd.exe Utilman.exe shutdown -r -t 0
The drive depends on the drive letter of your system when it’s being booted
Once you have in normal logon screen, press Windows Key + U or click the Ease of Access button, Command Prompt will pop up and type:
net user Administrator *
type your password twice.
Login with the new password.
Once you’re able to login, reboot the server, and back boot into Installation DVD, switch to the directory
C:\Windows\System32, rename Utilman.exe to Utilman.exe.tobedeleted, and move it to the other folder, and rename Utilman.exe.original back to Utilman.exe.
Reboot, and relogin. Find the Utilman.exe.tobedeleted file, and delete it.