How to Fix a Tombstoned Domain Controller

Photo of author

By Victor Ashiedu

Published

Read this guide to learn how to fix a tombstoned Active Directory Domain Controller, a DC that has not replicated to other DCs for a period over the Tombstone Lifetime.

Step 0: Review Problem Background and Overview

When you run dcdiag, other DCs in the domain report that the offending DC last synched on a date over the tombstone lifetime, which is 180 days by default.

Here is a sample log entry I received when I ran dcdiag:

Last replication received from <domain controller name> at 2022-09-08 06:09:58. WARNING:  This latency is over the Tombstone Lifetime of 180.

I ran the dcdiag command on April 10, 2025. This means the offending domain controller had not synced with other DCs for over 2 years! When this happens, we say that the DC has been “tombstoned,” which means that it has records older that the AD Forest’s Tombstone Lifetime.

As part of the first steps to troubleshoot and fix the problem, I performed the following actions:

  1. Confirmed that all required firewall ports between the tombstones DC and the FSMO role DC are open.
  2. Enabled DNS Debug logging. Then, after 24 hours, verified that the server is only communicating with itself, and has not accepted any incoming client requests.
  3. Enabled netlogon debug logging. After 24 hours, verified that the server did not respond to any logon or other event requests.

Once these tasks were performed, I had solid evidence to confirm that the DC was broken. In this scenario, the only solution was to demote the DC, perform metada clean up and then, re-promote the DC.

In the remaining sections of this guide, I have explained the detailed steps I used to accomplish these tasks.

Step 1: Remove the DNS Server Role from the DC

This must be performed first. Otherwise, the DC demotion task (Step 2) fails.

#Open PowerShell as administrator

Uninstall-WindowsFeature -Name DNS

Restart the server to complete the removal of the DNS role.

Step 2: Remove the Global Catalog Role from the DC

If the server is badly broken, you must remove the Global Catalog role from the DC. Otherwise, the DC demotion will also fail.

  1. Open Active Directory Sites and Services via Server Manager (link opens in a new browser tab).
  2. Then, navigate to the DC’s site and expand it, then expand Servers and click the server name. On the details blade, right-click NTDS Settings, and select Properties.
  1. After that, clear the Global Catalog check box, select Yes to the warning message, and finally, select OK.
clear the Global Catalog check box, select Yes to the warning message, and choose OK

Step 3: Demote the Server as a Domain Controller

#1. Save the password to use as local Administrator password. At the cred prompt, enter Administrator as the username and then, the password you want to use as the server's local Administrator password post its demotion as a DC

$password = Get-Credential

#2. Demote the Server as a DC

Uninstall-ADDSDomainController -LocalAdministratorPassword $password.password -Confirm:$false -NoRebootOnCompletion -ForceRemoval -SkipPreChecks

See the results of the commands below:

Save the password to use as local Administrator password. At the cred prompt, enter Administrator as the username and then, the password you want to use as the server's local Administrator password post its demotion as a DC
Uninstall-ADDSDomainController -LocalAdministratorPassword $password.password -Confirm:$false -NoRebootOnCompletion -ForceRemoval -SkipPreChecks

Restart the server to complete the demotion.

Demoting the server does not remove the Active Directory Domain Services (AD DS) role. So, we would not need to reinstall it.

Step 4: Perform Metadata Cleanup from the FSMO Role Holder

After demoting the DC, before re-proting it, you must perform a metadata cleanup of the DC using ntdsutil.

Follow the steps below to complete this task.

  1. Determine the FSMO role holder by running the command below from any Domain Controller.
netdom query fsmo
  1. Sign into the DC that holds the FSMO roles and open the command prompt as administrator. Then, run the following ntdsutil commands in the order provided.
#1. Type ntdsutil and press enter. Then, on the ntdsutil prompt, type metadata cleanup and press enter

ntdsutil: metadata cleanup

#2. On the metadata cleanup: prompt, execute the followin commands

metadata cleanup: connections
metadata cleanup: connect to server <domain_fsmo-role-holder>
metadata cleanup: q

#3. Then, on the metadata cleanup: prompt, type select operation target, then press enter key.

metadata cleanup: select operation target

#4. On the select operation target: prompt, run the following commands in order:

select operation target: list domains
select operation target: select domain <enter number for the domain where the failed DC resides>
select operation target: list sites
select operation target: select site <enter the site number of the failed DC>
select operation target: list servers in site
select operation target: select server <enter number of the server>
select operation target: q

#5. On the metadata cleanup: prompt, execute remove selected server

metadata cleanup: remove selected server

Then, on the Server Remove Confirmation Dialog, confirm that the DC you want to remove is displayed, then select Yes.

#6. Quit metadata cleanup and ntdsutil by executing the q command in both prompts
On the metadata cleanup: prompt, execute remove selected server
  1. Log on to the FSMO role DC and force replication by running the command below from a command prompt opened as administrator.
repadmin /syncall <domain_fsmo-role-holder> /Aped

Quit the repadmin command by pressing any key.

  1. Then, monitor the progress of the replication by running the command below. Replace the text in bold with the Distinguished Name of the server you’re cleaning its metadata.
repadmin /showobjmeta * "<enter the Distinguished Name of the server here>"
Do not proceed with the next steps until every DC reports that it can’t find the domain controller you’ve just removed from the domain. If all DCs report “Directory object not found,” then you can proceed to Step 5 below.

For the avoidance of doubt, the above command must only return parts of the result that says “Directory object not found.” If it rertuns a table, you must wait until the command no longer returns a table.

Step 5: Reinstall the DNS Server Role on the Server

In Step 1, we removed the DNS Server role. Before promoting it to a DC, you must reinstall this role with the following steps:

  1. Sign in to the server as local administrator – enter .\administrator in the username field – and use the password you specified in Step 3 when you demoted the server as a DC.
  2. Execute the command below to reinstall the DNS Server role, including all sub-features and management tools, and restart the server if required.
#Open PowerShell as administrator

Install-WindowsFeature -Name DNS -IncludeAllSubFeature -IncludeManagementTools -Restart

#see the screenshots below for the progress and result of the command
Reinstall the DNS Server Role on the Server 1
Reinstall the DNS Server Role on the Server 2

Step 6: Repromote the Server to a Domain Controller

While still signed in to the server with the local administrator account and PowerShell opened as administrator, execute these commands to promote the server to a DC.

I ran this command several times and it kept failing with error, “An Active Directory domain controller for the domain “FQDN” could not be contacted.” There was a problem with the DNS name resolution.
#1. Generate the required parameters. When you run this command, PowerShell will prompt you to enter creds - enter the domain username (domainname\username) and the password with permissions to promote a server to a Dc. 
#The command also prompts you to "Enter the domain to promote into" - enter the FQDN of the domain

$HashArguments = @{
Credential = (Get-Credential)
DomainName = (Read-Host "Enter the domain to promote into")
InstallDns = $true
}

#2. Promote the server to a DC and configure the server as a DNS server. This command will prompt you to enter the SafeModeAdministratorPassword (the Directory Service Restore Mode, DSRM password)

Install-ADDSDomainController @HashArguments

The screenshots below show the inputs and results of the commands.

Step 7: Configure the DC in Sites and Services

  1. Log in to the server with your domain credentials and open Active Directory Sites and Services from the Server Manager Tools menu.
Log in to the server with your domain credentials and open Active Directory Sites and Services from the Server Manager Tools menu.
  1. In the Active Directory Sites and Services console, navigate to the server’s site and expand it. Then, expand Server > <the DC’s server name> and left-click NTDS Settings.
  2. In the details blade, confirm that the replication connection was automatically generated. If it has not been generated, run the command below to generate it.
repadmin /kcc
  1. After that, verify that the server’s subnet is associated with the site. To do this, right-click the site and choose Properties. The server’s subnet should be displayed in the Subnets section of the General tab – see the second screenshot below for reference.
I included the ipconfig command result in the second screenshot to compare the server’s subnet with the subnet displayed in its site’s Subnet in AD SS console.
To do this, right-click the site and choose Properties
The server's subnet should be displayed in the Subnets section of the General tab - see the second screenshot below for reference.

Step 8: Perform Manual Replication and Verify Success

  1. While still signed in to the server, open PowerShell or CMD as administrator and run the following command:
repadmin /syncall <enter the name of the FSMO DC here> /Aped

Wait for the replication command to complete, then press Q before proceeding to the next step.

In my case, my command returned an error, as one of the DCs could not be contacted. However, this didn’t stop me from proceeding to the next step.
  1. Verify that the repadmin command was successful by executing the PowerShell command below:
Get-ADReplicationPartnerMetadata -Target $env:userdnsdomain -Scope Domain | Select-Object Server, LastReplicationAttempt, LastReplicationSuccess, PartnerType
Depending on the number of DCs and sites in your environment, the command will take a while to complete.

In my case, the above command failed to contact some DCs. Further troubleshooting confirms that the AD ports required to replicate and work were blocked from the DC where I ran the Get-ADReplicationPartnerMetadata command.

Get-ADReplicationPartnerMetadata -Target $env:userdnsdomain -Scope Domain | Select-Object Server, LastReplicationAttempt, LastReplicationSuccess, PartnerType

To fix the problem, I requested that the SecOps team open those ports. Once the ports were opened, I re-ran Get-ADReplicationPartnerMetadata, and there were no more failures.

Step 9: Rerun DCDIAG to Check for Replication Errors

Finally, rerun dcdiag in the DC you just repaired and on the FSMO role DC to check for replication errors.

Conclusion

The Windows Active Directory Domain Controllers are designed to regularly replicate and update the AD database. However, in rare instances, one DC may stop replicating.

If this happens and you have confirmed that all required AD ports are opened, the last step to fix the DC is to demote it, perform metadata clean-up of its objects from the AD database, and finally re-promote it to a DC.

In this guide, I outlined the detailed steps to fix a tombstoned AD DC by following the above steps.

About the Author

Photo of author

Victor Ashiedu

Victor is the founder of InfoPress Media, publishers of Ilifeguides and Itechguides. With 20+ years of experience in IT infrastructure, his expertise spans Windows, Linux, and DevOps. Explore his contributions on Itechguides.com for insightful how-to guides and product reviews.

Related Articles

Get in Touch

We're committed to writing accurate content that informs and educates. To learn more, read our Content Writing Policy, Content Review Policy, Anti-plagiarism Policy, and About Us.

However, if this content does not meet your expectations, kindly reach out to us through one of the following means:

  1. Respond to "Was this page helpful?" above
  2. Leave a comment with the "Leave a Comment" form below
  3. Email us at [email protected] or via the Contact Us page.

Leave a comment

Send this to a friend