Fix AD error 8240 (there is no such object on the server): event 1126 when no global catalog is reachable, or replication of an object the destination DC lacks (lingering object or a DC demoted too early).
Home › Guides › AD replication error 8240
Last updated 19 November 2026
Win32 error 8240 (0x2030, ERROR_DS_NO_SUCH_OBJECT) means Active Directory looked for an object and couldn't find it. You meet it in two quite different situations, so first work out which one you have:
Get-ADDomainController -Discover -Service "GlobalCatalog"), that it's registered in DNS (nltest /dnsgetdc:<DomainName> /gc /force), that isGlobalCatalogReady is TRUE and that port 3268 answers.repadmin /removelingeringobjects), deliberately keep it, or rebuild the source DC.Situation 1, the Directory Service log on a DC that is looking for a GC:
Event Type: Error Event Source: NTDS General Event Category: Global Catalog Event ID: 1126 User: NT AUTHORITY\ANONYMOUS LOGON Description: Active Directory was unable to establish a connection with the global catalog. Additional Data Error value: 8240 There is no such object on the server. Internal ID: 3200ba0
Situation 2, error 8240 during an AD DS operation. repadmin /showreps:
<SiteName>\<DCName> objectGuid: <GUID> Last attempt @ <Time> failed, result 8240: There is no such object on the server. Last success @ (never).
Replicate now in Active Directory Sites and Services (dssite.msc):
The following error occurred during the attempt to synchronize naming context <Naming-Context> from Domain Controller <Source-DCName> to Domain Controller <Destination-DCName>: There is no such object on the server. This operation will not continue.
Removing AD DS from a DC (the installation wizard during demotion):
Active Directory could not transfer the remaining data in directory partition <Naming-Context> to domain controller <DCName>. "There is no such object on the server."
| Where you see it | Situation | Go to |
|---|---|---|
| Event 1126 (NTDS General, Global Catalog category) | 1: no usable global catalog | Steps 1-3 |
| repadmin /showreps or /showrepl, result 8240 | 2: object missing on the destination DC | Steps 4-5 |
| Replicate now dialog in dssite.msc | 2 | Steps 4-5 |
| Demotion wizard can't transfer remaining data | 2 | Steps 4-5 |
Some work, such as looking up a user's universal group memberships, can only be done by a DC that holds the global catalog role. When a DC needs a GC and can't find an available one, it logs event 1126 with error 8240. Either the forest has no GC at all, or there is one but this DC can't locate it or talk to it.
From PowerShell with the Active Directory module, on any computer in the forest:
Get-ADDomainController -Discover -Service "GlobalCatalog"
You can promote a new DC as a GC, or turn on the role on an existing DC:
Don't expect the GC to be usable straight away. The KCC has to work out a new topology, the DC has to pull the read-only partitions for every other domain, and only then does it announce that it's ready. How long that takes depends on your replication schedules, how much data there is and the KCC interval.
nltest /dnsgetdc:<DomainName> /gc /force
Get-ADRootDSE -Server <GC_Name> | Format-List serverName, isGlobalCatalogReadyYou can read the same attribute by connecting ldp.exe to the GC on port 389. It should be TRUE. FALSE means the GC hasn't finished its first replication yet, or something else is wrong on that server (check its own replication with
repadmin /showrepl).Every change starts on one DC and spreads from partner to partner. For one source and destination pair the flow that ends in 8240 is:
Microsoft gives two ways an object ends up existing on the source but missing on the destination:
The DC that reports 8240 is the destination: it doesn't have the object. The source does. Sometimes the error text names the source DC and sometimes it doesn't; in a larger topology, use the destination's Directory Service log and its connection objects in Active Directory Sites and Services to work out which partner sent the change. Check the source's other partners too, because they can report the same 8240. Then pick one of the three options below: remove the object, keep it, or rebuild the source DC.
| Option | What it does | When it fits |
|---|---|---|
| 1. Remove the inconsistent objects from the source DC | Treat them as lingering objects and delete them | The objects should be gone (the usual case) |
| 2. Keep them and replicate them to the forest | Registry changes on the destination DC let it accept and re-create the objects | The objects are still needed |
| 3. Remove and re-create the source DC | Force-demote it, clean up metadata, promote it again | The source DC's data can't be trusted |
Microsoft recommends Lingering Object Liquidator v2 (LoLv2). Where you can't use it, use repadmin, starting in advisory mode so it only reports what it would delete:
repadmin /removelingeringobjects <DC with lingering objects> <writable source DSA GUID> <NC DN> /ADVISORY_MODE
The 8606 guide walks through the whole lingering-object cleanup.
Back up the registry first. On the destination DC, under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\NTDS\Parameters, set three REG_DWORD values:
| Value name | Data |
|---|---|
| Strict Replication Consistency | 0 |
| Allow Replication With Divergent and Corrupt Partner | 1 |
| Correct Missing Object | 1 |
Then wait for the next replication cycle, or use Replicate now on the specific connection in Active Directory Sites and Services. Be careful in large forests: while the objects spread, more DCs can report 8240 until replication catches up. Strict replication consistency is the setting that normally stops a DC from accepting lingering objects (see the 8606 guide), so plan to set it back to 1 once the objects you want to keep have replicated.
Uninstall-ADDSDomainController -ForceRemovalMicrosoft's article shows
-Force; per the cmdlet reference that switch only skips the confirmation prompt, while -ForceRemoval is the one that forces removal (the wizard equivalent is Force the removal of this domain controller in Server Manager's Remove Roles and Features).repadmin /showrepl on the destination: which partition and which source partner fail.Look up 1126, 1388 and 1988 in the Windows Event ID Lookup, copy the Get-ADDomainController, nltest, Get-ADRootDSE, repadmin and Uninstall-ADDSDomainController lines from the PowerShell Cheat Sheet, pull the failing partner and partition out of saved repadmin output with the Regex Tester, check which site a GC address belongs to with the IPv4 Subnet Calculator or IPv6 Subnet Calculator, and identify a device in the path from its MAC address with the MAC Vendor Lookup. Related guides: replication error 8606 (lingering objects), replication error 8614, replication error 8589 and replication error 1908.
Every AD replication error code with its cause and fix: common Active Directory replication errors.
There is no such object on the server (0x2030, ERROR_DS_NO_SUCH_OBJECT): Active Directory looked for an object it needed and couldn't find it. It appears either in event 1126 when a DC can't connect to a global catalog, or in replication when the destination DC doesn't have the object a change refers to.
Make sure the forest has a global catalog (Get-ADDomainController -Discover -Service GlobalCatalog), add one in Active Directory Sites and Services if not, then check it's in DNS with nltest /dnsgetdc:
The destination DC was asked to update an object it doesn't have. Usually the object is a lingering object on the source DC (deleted elsewhere but kept on a DC that missed the deletion past the tombstone lifetime), or the source DC was demoted before all partners pulled its changes.
Normally remove them as lingering objects with Lingering Object Liquidator or repadmin /removelingeringobjects. Keep them only if they are really needed: then the destination DC needs Strict Replication Consistency 0, Allow Replication With Divergent and Corrupt Partner 1 and Correct Missing Object 1; plan to set strict replication consistency back to 1 afterwards.
Yes, that's the third option: force-demote it with Uninstall-ADDSDomainController -ForceRemoval (or Force the removal in Server Manager), clean up its metadata, promote it again and let it pull a fresh copy of the forest data.
Runbooks, checklists and helpdesk templates: IT Admin Packs on Gumroad.