Who this guide is for
System administrators, DevOps engineers, and anyone who manages a Windows Server 2019 or 2022 machine and has lost the local administrator credentials. The methods work on physical servers, virtual machines, and VPS instances (including those provisioned through Tarisu).
Prerequisites
A Windows Server 2019 or 2022 ISO file (the same version and edition as the installed OS).
Ability to boot the target machine from that ISO (physical media, virtual DVD, or attached ISO in a hypervisor/VPS control panel).
Access to the server’s console (monitor/keyboard, IPMI, hypervisor console, or VNC).
A backup of critical data – password‑reset procedures modify system files and should be treated as a recovery operation.
Method 1 – Reset via Windows Installation Media (Utilman replacement)
This classic technique swaps the Ease‑of‑Access utility (utilman.exe) for a command prompt, giving you a privileged shell at the logon screen.
Step‑by‑step
Attach the Windows Server ISO and boot the server from it.
On the language screen click Next, then choose Repair your computer.
Navigate to Troubleshoot → Command Prompt. A
cmd.exewindow opens in the Windows Recovery Environment (WinRE).Identify the drive letter that holds the Windows installation. In WinRE the system drive is often
D:rather thanC:. Use DiskPart to be sure:diskpart list volume exitLook for the volume labeled “Windows” or the one with the largest NTFS size; note its letter (e.g.,
D:).Back up the original
utilman.exe:copy D:\Windows\System32\utilman.exe D:\Windows\System32\utilman.exe.bakReplace
utilman.exewithcmd.exe:copy D:\Windows\System32\cmd.exe D:\Windows\System32\utilman.exeClose the command prompt and restart the server (remove the ISO so it boots normally).
At the Windows logon screen click the Ease of Access icon (or press Win+U). A command prompt running as SYSTEM appears.
Reset the administrator password:
net user Administrator NewStrongPassword123!Replace
NewStrongPassword123!with a strong password of your choice.Close the command prompt and sign in with the new password.
Important: Restore the original
utilman.exeto avoid leaving a backdoor. Boot again into WinRE (repeat steps 1‑3) and run:copy D:\Windows\System32\utilman.exe.bak D:\Windows\System32\utilman.exe
What you should see
After step 8 a black command‑prompt window opens with the title “Administrator: X:\Windows\System32\cmd.exe”.
The
net usercommand returns “The command completed successfully.”After the final restore, the Ease‑of‑Access button launches the normal utility again.
Method 2 – Offline Registry Edit (for advanced users)
If you prefer not to replace system binaries, you can load the offline SAM hive and clear the password hash directly. This method requires careful typing; a mistake can render the OS unbootable.
Step‑by‑step
Boot from the Windows Server ISO and open the WinRE Command Prompt (steps 1‑3 of Method 1).
Determine the system drive letter (usually
D:) as described in Method 1 step 4.Load the offline SYSTEM hive into a temporary registry key:
reg load HKLM\TempSys D:\Windows\System32\config\SYSTEMNavigate to the key that stores the administrator account’s password hint (optional) and the user account control flags. The actual password hash lives in the SAM hive, which is not directly editable via
reg. Instead, use thenet usercommand after the OS boots. Therefore, this method is limited to enabling the built‑in administrator if it is disabled:reg add "HKLM\TempSys\Setup" /v CmdLine /t REG_SZ /d "cmd.exe" /f reg add "HKLM\TempSys\Setup" /v SetupType /t REG_DWORD /d 2 /fUnload the hive:
reg unload HKLM\TempSysReboot the server. It will start a command prompt at the logon screen (because of the Setup key). Run:
net user Administrator NewStrongPassword123! net user Administrator /active:yesAfter logging in, revert the Setup keys to their defaults (boot again into WinRE and delete the two values added in step 4).
What you should see
After step 5 the server boots to a plain command prompt before the GUI loads.
The
net usercommands succeed and the administrator account becomes active.
Troubleshooting common errors
Error / Symptom | Likely cause | Fix |
|---|---|---|
| Wrong drive letter (WinRE often maps the OS to | Re‑run |
| Command prompt not running as SYSTEM (e.g., you opened a normal user CMD). | Ensure you launched the prompt via the Utilman replacement or WinRE; both run as SYSTEM. |
Server boots to a black screen after modifying the Setup registry keys. | Incorrect registry values or missing | Boot back into WinRE, load the hive again, and delete the |
VNC console shows “No bootable device” after attaching ISO. | Boot order not updated or ISO not properly mounted. | In the control panel, verify the ISO is attached, set boot priority to CD/DVD, and power‑cycle the VPS. |
Password reset works but the account is still locked out. | Account lockout policy prevents login after failed attempts. | Run |
Security notes
Resetting the local administrator password is a privileged operation. Treat it like any other credential change:
Use a strong, unique password (minimum 14 characters, mixed case, numbers, symbols).
After regaining access, audit recent event logs (
eventvwr.msc→ Security) for suspicious logons.Restore any modified system files (
utilman.exe, registry Setup keys) immediately.Consider disabling the built‑in Administrator account after creating a named admin account with a strong password.
If the server is internet‑facing, verify that Remote Desktop is restricted to trusted IPs or protected by a VPN.
Frequently Asked Questions
Can I reset the password without an ISO?
On a physical or virtual machine you need a way to run code before the OS loads. The ISO (or a Windows PE USB) provides that environment. Some hypervisors allow you to inject a password‑reset script via cloud‑init, but that only works if the feature was enabled beforehand.
Will these steps work on Windows Server 2016?
The Utilman replacement works on 2016 as well, but the ISO must match the installed version (2016). The registry‑edit method also applies, though the exact registry paths are identical.
Is it safe to leave utilman.exe replaced?
No. Leaving cmd.exe in place of utilman.exe gives anyone with physical or console access a SYSTEM shell at the logon screen. Always restore the original file after the reset.
What if the server uses BitLocker on the system drive?
You must unlock the drive first. In WinRE, run manage-bde -unlock D: -RecoveryPassword YOUR_RECOVERY_KEY (replace D: and the key). After unlocking, the drive letter may change; re‑run diskpart → list volume to confirm.
Can I automate this for many servers?
Automation is possible with configuration‑management tools (Ansible, PowerShell DSC) that deploy a password‑reset script during a scheduled maintenance window, but you still need a bootable media for the initial recovery. For fleets, consider a centralized identity solution (Active Directory, Azure AD) to avoid local admin password sprawl.
Does Tarisu offer a managed password‑reset service?
Tarisu’s VPS control panel lets you attach an ISO and access the VNC console, which is all you need to perform the steps above yourself. Managed services for credential recovery are not included by default.