Skip to content
Tarisu Limited

How to Reset the Administrator Password on Windows Server 2019 and 2022

Step-by-step guide to recover or reset the local administrator password on Windows Server 2019 and 2022 using installation media, offline registry editing, and VPS console rescue mode.

Guides 6 min read Tarisu Limited

How to Reset the Administrator Password on Windows Server 2019 and 2022

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

  1. Attach the Windows Server ISO and boot the server from it.

  2. On the language screen click Next, then choose Repair your computer.

  3. Navigate to Troubleshoot → Command Prompt. A cmd.exe window opens in the Windows Recovery Environment (WinRE).

  4. Identify the drive letter that holds the Windows installation. In WinRE the system drive is often D: rather than C:. Use DiskPart to be sure:

    diskpart
    list volume
    exit

    Look for the volume labeled “Windows” or the one with the largest NTFS size; note its letter (e.g., D:).

  5. Back up the original utilman.exe:

    copy D:\Windows\System32\utilman.exe D:\Windows\System32\utilman.exe.bak
  6. Replace utilman.exe with cmd.exe:

    copy D:\Windows\System32\cmd.exe D:\Windows\System32\utilman.exe
  7. Close the command prompt and restart the server (remove the ISO so it boots normally).

  8. At the Windows logon screen click the Ease of Access icon (or press Win+U). A command prompt running as SYSTEM appears.

  9. Reset the administrator password:

    net user Administrator NewStrongPassword123!

    Replace NewStrongPassword123! with a strong password of your choice.

  10. Close the command prompt and sign in with the new password.

  11. Important: Restore the original utilman.exe to 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 user command 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

  1. Boot from the Windows Server ISO and open the WinRE Command Prompt (steps 1‑3 of Method 1).

  2. Determine the system drive letter (usually D:) as described in Method 1 step 4.

  3. Load the offline SYSTEM hive into a temporary registry key:

    reg load HKLM\TempSys D:\Windows\System32\config\SYSTEM
  4. Navigate 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 the net user command 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 /f
  5. Unload the hive:

    reg unload HKLM\TempSys
  6. Reboot 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:yes
  7. After 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 user commands succeed and the administrator account becomes active.

Troubleshooting common errors

Error / Symptom

Likely cause

Fix

The system cannot find the file specified when copying utilman.exe

Wrong drive letter (WinRE often maps the OS to D: or E:).

Re‑run diskpart → list volume and use the correct letter.

Access is denied on net user

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 cmd.exe path.

Boot back into WinRE, load the hive again, and delete the CmdLine and SetupType values.

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 net user Administrator /active:yes and, if needed, net accounts /lockoutthreshold:0 temporarily.

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.

Related posts

We use strictly necessary cookies to keep you signed in and remember your preferences. We would also like to measure how the site is used, but only with your agreement. Read our privacy policy