Quick answer
Run ntdsutil metadata cleanup to remove the dead Domain Controller from the configuration partition, then force replication with repadmin /syncall.
What's going on here?
You're getting ERROR_DS_CANT_FIND_DSA_OBJ (0X000020E3) when trying to replicate Active Directory. The DSA object is the server's representation in the configuration partition (CN=Servers,CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=yourdomain,DC=com). If a Domain Controller (DC) was forcefully removed — maybe you demoted it badly, or it died — the reference is still there but the actual object is gone or orphaned. Replication tries to find that object and fails with this error.
I've seen this most often after someone runs dcpromo /forceremoval without cleanup, or after restoring a DC from backup without proper metadata cleanup. It also pops up when you try to replicate to a DC that was tombstoned and then re-promoted with the same name.
Fix steps — main method
-
Open a Command Prompt as Administrator. Don't skip this — right-click and pick "Run as administrator".
After you click that, you should see a black window with Administrator in the title bar.
-
Start ntdsutil. Type
ntdsutiland press Enter.The prompt changes to
ntdsutil:. That means you're in. -
Go to metadata cleanup. Type
metadata cleanupand press Enter.You'll see
metadata cleanup:. -
Connect to a working DC. Type
connectionsand press Enter. Then typeconnect to server <working-DC-name>(use the actual name of a good DC, like DC01). Press Enter. Then typeqand press Enter to go back.You should see a message that says "Binding to ... connected." If it fails, check your DNS — this error loves bad DNS.
-
Select the problematic server. At the
metadata cleanup:prompt, typeselect operation targetand press Enter. Then typelist sitesand press Enter. You'll see a list of sites. Typeselect site 0(or the correct number) and press Enter. Then typelist servers in siteand press Enter. Find the dead DC in the list. Typeselect server <number of dead DC>and press Enter.After selecting, type
qtwice to go back tometadata cleanup:. -
Remove the selected server. Type
remove selected serverand press Enter. Confirm with Yes.You'll get a message like "Removal completed successfully." If you get an error, the DC might still be alive — check if it's really dead first.
-
Run repadmin to force replication. Type
repadmin /syncall /AdePand press Enter.You should see replication events completing without the 0X000020E3 error. If you still see it, you missed a dead DC somewhere.
Alternative fix if the main method fails
If ntdsutil fails because of permission issues or the dead server is still partially alive, you can use ADSI Edit to manually delete the orphaned server object.
-
Open ADSI Edit (add it from Server Manager if you don't have it).
After opening, you'll see a blank console.
-
Connect to the Configuration partition. Right-click "ADSI Edit" in the left pane, pick "Connect to...", then in "Select a well known Naming Context", pick "Configuration". Click OK.
You should see a tree expand under CN=Configuration,DC=yourdomain,DC=com.
-
Navigate to the dead server. Expand CN=Sites, then CN=Default-First-Site-Name (or your site), then CN=Servers. Find the server name that matches the error. Right-click it and pick Delete.
Confirm the deletion. That object is now gone.
-
Run dcdiag /test:replications to verify.
You should see "passed test Replications" with no errors.
Warning: Deleting the wrong server object can break replication for that DC. Only delete if you're 100% sure it's dead and not coming back.
Prevention tip
Before demoting any DC, always use Server Manager to remove the Domain Controller role or run dcpromo /unattend with the right answer file. Never use /forceremoval unless the server is physically gone. If a DC fails and you can't demote it properly, run metadata cleanup within 24 hours. After that, tombstone cleanup gets messy and you end up with this error. Keep your DNS records clean too — stale DC records are the #1 cause of this mess.