How to Recover Deleted Administrator Account in Windows 10

Windows 10 comes with two types of user accounts. One is standard or guest user and the other is administrator account. Even if you are the owner of the computer, it is safer to use your computer with Standard user account for safety reasons. But, what happens when you delete administrator account accidentally? How to recover deleted administrator account?

Recover Deleted Administrator Account In Windows 10

That’s a tricky one, I admit. You can create a new admin or standard user account through an admin account only. Now that you have deleted it, there is no way to create new accounts. It’s like a catch 22.

Let’s begin.

1. Built-in Administrator Account

It seems that the dev team working at Microsoft foresaw this situation coming. That’s because they developed a built-in administrator account in Windows that you can’t delete or mess around with. Search for and open the Command Prompt with admin rights. Either right-click or select Run as administrator in the search results itself to do so.

Recover Deleted Administrator Account In Windows 10 1

Give the below command to activate built-in administrator account.

net user administrator /active: yes
Recover Deleted Administrator Account In Windows 10 5

Wait for the process to complete. Now, give this command to turn your existing standard user account into administrator account. Replace UserName with your current account name.

net localgroup administrators UserName /add

Try creating a new user account with administrator rights. If successful, give the below command to turn off the built-in admin account.

net user administrator /active: no

If you can’t even run Command Prompt with admin rights or the option is grayed out, try this.

Click on the Start menu, press and hold the Shift key and then select Restart. This will boot your computer directly into Windows 10 Recovery Environment.

Recover Deleted Administrator Account In Windows 10 8

You will now select Troubleshoot > Advanced Options > Command Prompt.

Recover Deleted Administrator Account In Windows 10 9

See if you can give the above commands now and if it works, create a new user with admin rights immediately. Don’t forget to turn built-in admin account off as discussed.

2. Local Security Policy

If the Command Prompt is still not working, here is another way. Search for Local Security Policy in the Start menu and open it.

Recover Deleted Administrator Account In Windows 10 15

Drill down to the below folder structure.

Security Settings > Local Policies > Security Options
Recover Deleted Administrator Account In Windows 10 16

Check if the Accounts: Administrator account status is enabled or not. If it isn’t, double-click to open it and change the Security Setting to Enabled here.

Recover Deleted Administrator Account In Windows 10 17

3. Registry Hack

Still no joy? Hang on, I got you. This trick should work for most users. Take a back up in an external hard drive first. I keep saying it but can’t stress it enough.

Reboot the computer into Windows 10 Recovery Environment again as you did in the step above. Open Command Prompt again and give this command.

regedit

That will open the Registry Editor. Select HKEY_LOCAL_MACHINE. Don’t double-click because that will expand it.

Recover Deleted Administrator Account In Windows 10 10

Click on the File menu button and select Load Hive.

Recover Deleted Administrator Account In Windows 10 11

Navigate to the following folder structure.

System root drive > Windows > System32 > config

Select file named SAM (Security Account Manager) and click on Open.

Recover Deleted Administrator Account In Windows 10 12

You will be asked to name it now. Name it REM_SAM. Don’t forget this name. Now navigate to the below folder structure.

HKEY_LOCAL_MACHINE\REM_SAM\SAM\Domains\Accounts\Users\000001F4
Recover Deleted Administrator Account In Windows 10 13

Highlight the 000001F4 key and in the right window pane, double-click on F DWORD file to open it.

Recover Deleted Administrator Account In Windows 10 14

You need to put the cursor in line 0038 under Value data just after the value 11. Press the delete key to remove that number and type 10. Save. Close everything and reboot your computer. You should now have admin rights. Create a new user with admin rights and go back to revert the changes.

4. Reset Computer

This is unfortunate but there is nothing really you can do now. I suggest you take a backup of everything that sits on your hard drive, to be on the safer side. You will have to reset your computer. You can enter Advanced Startup Options as shared in the step above or follow another way shared below.

Press Windows key+I to open Settings and click on Update & Security.

Recover Deleted Administrator Account In Windows 10 2

Click on the Get started under Reset this PC heading in Recovery tab.

Recover Deleted Administrator Account In Windows 10 3

Click on Remove everything.

Recover Deleted Administrator Account In Windows 10 4

In the next screen, you can either confirm or click on Change settings to select an option that will only wipe the C drive. That’s usually where Windows is installed.

Recover Deleted Administrator Account In Windows 10 6

Follow on-screen instructions after that which involves agreeing to reset the PC.

Recover Deleted Administrator Account In Windows 10 7

Make sure that your computer is connected to a power source as the process may take some time.

Note: If you don’t see Remove everything and reinstall Windows under Recovery, you need to click on Advanced Startup and then select Reset. Why? That’s because you don’t have admin rights.

Admin Is Always Right

It can be scary to lose your administrator account. To make sure that it never happens to you again, create two admin accounts this time. That way, if you delete one accidentally again, there is always a spare one to fool around with.

Next up: Want to change admin password of your computer? Click on the link below to learn how.

Last updated on 13 July, 2021

The above article may contain affiliate links which help support Guiding Tech. However, it does not affect our editorial integrity. The content remains unbiased and authentic.