Remove Lingering Objects that cause AD Replication error 8606 and friends

First published on TechNet on Sep 15, 2014

Introducing the Lingering Object Liquidator

Hi all, Justin Turner here —it's been a while since my last


. The goal of this post is to discuss what causes lingering objects and show you download, and then use the new GUI-based

Lingering Object Liquidator

(LOL) tool to remove them. This is a beta version of the tool, and it is currently not yet optimized for use in large Active Directory environments.

This is a long article with lots of background and screen shots, so plug-in or connect to a fast connection when viewing the full entry. The bottom of this post contains a link to my AD TechNet lab for those that want to get their hands dirty with the joy that comes with finding and fixing AD replication errors.  I've also updated the post with a link to my Lingering Objects hands-on


from TechEd Europe.

Overview of Lingering Objects

Lingering objects are objects in AD than have been created, replicated, deleted, and then garbage collected on at least the DC that originated the deletion but still exist as live objects on one or more DCs in the same forest. Lingering object removal has traditionally required lengthy cleanup sessions using tools like




/removelingeringobjects. The removal story improved significantly with the release of


. We now have another tool for our tool belt: Lingering Object Liquidator. There are related topics such as “lingering links” which will not be covered in this post.

Lingering Objects Drilldown

The dominant causes of lingering objects are


Long-term replication failures

While knowledge of creates and modifies are persisted in Active Directory forever, replication partners must inbound replicate knowledge of deleted objects within a rolling Tombstone Lifetime (TSL) # of days (default

60 or 180 days depending

on what OS version created your AD forest). For this reason, it is important to keep your DCs online and replicating all partitions between all partners within a rolling TSL # of days. Tools like REPADMIN /SHOWREPL * /CSV, REPADMIN /REPLSUM and

AD Replication Status

should be used to continually identify and resolve replication errors in your AD forest.


Time jumps

System time jump more than TSL # of days in the past or future can cause deleted objects to be prematurely garbage collected before all DCs have inbound replicated knowledge of all deletes. The protection against this is to ensure that :

    1. your forest root PDC is

      continually configured

      with a reference time source (including following FSMO transfers
    2. All other DCs in the forest are configured to use NT5DS hierarchy
    3. Time rollback and roll-forward protection has been enabled via the




      registry settings or their policy-based equivalents.

The importance of configuring safeguards can't be stressed enough. Look at this


to see what happens when time gets out of whack.


USN Rollbacks

USN rollbacks are caused when the contents of an Active Directory database move back in time via an unsupported restore. Root causes for USN Rollbacks include:

  • Manually copying previous version of the database into place when the DC is offline
  • P2V conversions in multi-domain forests
  • Snapshot restores of physical and especially virtual DCs. For virtual environments, both the virtual host environment AND the underlying guest DCs should be

    Virtual Machine Generation ID capable

    . 2012 or later. Both




    make VM-Generation ID aware host.

Events, errors and symptoms that indicate you have lingering objects

Active Directory logs an array of events and replication status codes when lingering objects are detected. It is important to note that while errors appear on the destination DC, it is the source DC being replicated from that contains the lingering object that is blocking replication. A summary of events and replication status codes is listed in the table below:

Event or Error status

Event or error text

AD Replication status


“Insufficient attributes were given to create an object. This object may not exist because it may have been deleted.” Lingering objects are present on the source DC (destination DC is operating in Strict Replication Consistency mode)
AD Replication status


The directory service cannot replicate with this server because the time since the last replication with this server has exceeded the tombstone lifetime. Lingering objects likely exist in the environment
AD Replication status 8240 There is no such object on the server Lingering object may exist on the source DC
Directory Service

event ID 1988

Active Directory Domain Services Replication encountered the existence of objects in the following partition that have been deleted from the local domain controllers (DCs) Active Directory Domain Services database. Lingering objects exist on the source DC specified in the event

(Destination DC is running with Strict Replication Consistency)

Directory Service


ID 1388

This destination system received an update for an object that should have been present locally but was not. Lingering objects were reanimated on the DC logging the event

Destination DC is running with Loose Replication Consistency

Directory Service

event ID 2042

It has been too long since this server last replicated with the named source server. Lingering object may exist on the source DC

A comparison of Tools to remove Lingering Objects

The table below compares the Lingering Object Liquidator with currently available tools that can remove lingering objects

Removal method

Object / Partition & and Removal Capabilities

Lingering Object Liquidator Per-object and per-partition removal


  • RemoveLingeringObjects LDAP rootDSE modification
  • DRSReplicaVerifyObjects method

  • GUI-based.
  • Quickly displays all lingering objects in the forest to which the executing computer is joined.
  • Built-in discovery via DRSReplicaVerifyObjects method
  • Automated method to remove lingering objects from all partitions
  • Removes lingering objects from all DCs (including RODCs) but not lingering links.
  • 2008 and later DCs (will not work against 2003 DCs)

Repldiag /removelingeringobjects Per-partition removal


  • DRSReplicaVerifyObjects method

  • Command line only
  • Automated method to remove lingering objects from all partitions
  • Built-in discovery via DRSReplicaVerifyObjects
  • Displays discovered objects in events on DCs
  • Does not remove lingering links. Does not remove lingering objects from RODCs (yet)

LDAP RemoveLingeringObjects rootDSE primative (most commonly executed using LDP.EXE or an LDIFDE import script) Per-object removal
  • Requires a separate discovery method
  • Removes a single object per execution unless scripted.

Repadmin /removelingeringobjects Per-partition removal


  • DRSReplicaVerifyObjects method

  • Command line only
  • Built-in discovery via DRSReplicaVerifyObjects
  • Displays discovered objects in events on DCs
  • Requires many executions if a comprehensive (n * n-1 pairwise cleanup is required. Note: repldiag and the Lingering Object Liquidator tool automate this task.

The Repldiag and Lingering Object Liquidator tools are preferred for lingering object removal because of their ease of use and holistic approach to lingering object removal.

Why you should care about lingering object removal

Widely known as the gift that keeps on giving, it is important to remove lingering objects for the following reasons

  • Lingering objects can result in a long term divergence for objects and attributes residing on different DCs in your Active Directory forest
  • The presence of lingering objects prevents the replication of newer creates, deletes and modifications to destination DCs configured to use strict replication consistency. These un-replicated changes may apply to objects or attributes on users, computers, groups, group membership or ACLS.
  • Objects intentionally deleted by admins or application continue to exist as live objects on DCs that have yet to inbound replicate knowledge of the deletes.

Once present, lingering objects rarely go away until you implement a comprehensive removal solution. Lingering objects are the unwanted houseguests in AD that you just can't get rid of.


Mother in law jokes… a timeless classic.

We commonly find these little buggers to be the root cause of an array of symptom ranging from logon failures to Exchange, Lync and AD DS service outages. Some outages are resolved after some lengthy only to find the issue return weeks later.

The remainder of this post, we will give you everything needed to eradicate lingering objects from your environment using the Lingering Object Liquidator.

Repldiag.exe is another tool that will automate lingering object removal. It is good for most environments, but it does not provide an interface to see the objects, clean up RODCs (yet) or remove abandoned objects.

Introducing Lingering Object Liquidator

Lingering Object Liquidator automates the discovery and removal of lingering objects by using the


method used by repadmin /removelingeringobjects and repldiag combined with the


rootDSE primitive used by LDP.EXE. Tool features include:
  • Combines both discovery and removal of lingering objects in one interface
  • Is available via the Microsoft Connect site
  • The version of the tool at the Microsoft Connect site is an early beta build and does not have the fit and finish of a finished product
  • Feature improvements beyond what you see in this version are under consideration

How to obtain Lingering Object Liquidator

Updated October 9th, 2017 with link to new released version.

Download LoL from this link:

Read about this newer released version here:

If the download does not work, try opening the link from an InPrivate browser tab.  If it still does not work, follow these steps:

1. Log on to the Microsoft Connect site (using the

Sign in

) link with a Microsoft account:

Note: You may have to create a profile on the site if you have never participated in Connect.

2. Open the Non-feedback Product Directory:

3. Join the following program:

AD Health

Product Azure Active Directory Connection

Join link


4. Click the


link to see a list of downloads or this


to go directly to the Lingering Objects Liquidator download. (Note: the direct link may become invalid as the tool gets updated.)

Updated 8/01/2016 with link to latest version of the tool

5. Download all associated files

6. Double click on the downloaded executable to open the tool.

Tool Requirements

1. Install Lingering Object Liquidator on a DC or member computer in the forest you want to remove lingering objects from.

2. .NET 4.5 must be installed on the computer that is executing the tool.

3. Permissions: The user account running the tool must have Domain Admin credentials for each domain in the forest that the executing computer resides in. Members of the Enterprise Admins group have domain admin credentials in all domains within a forest by default. Domain Admin credentials are sufficient in a single domain or single domain forest.

4. The admin workstation must have connectivity over the same port and protocol required of a domain-joined member computer or against any DC in the forest. Protocols of interest include DNS, Kerberos, RPC, LDAP and ephemeral port range used by the targeted DC See


for more detail. Of specific concern: Pre-W2K8 DCs communicate over the “low” ephemeral port between 1024 and 5000 while post W2K3 DCs use the “high” ephemeral port range between 49152 to 65535. Environments containing both OS version families will need to enable connectivity over both port ranges.

5. You must enable the Remote Event Log Management (RPC) firewall rule on any DC that needs scanning. Otherwise, the tool displays a window stating, “Exception: The RPC server is unavailable”



6. The liquidation of lingering objects in AD Lightweight Directory Services (AD LDS / ADAM) environments is not supported.

7. You cannot use the tool to cleanup lingering objects on DCs running Windows Server 2003.  The tool leverages the event subscriptions feature which wasn't added until Windows Server 2008.


Lingering Object Detection:

Run the tool as Domain Administrator (Enterprise Administrator if you want to scan the entire forest) Error 8453 is observed if the tool is not run elevated.

1. Launch




2. From the

Topology Detection

section, select



Fast detection populates the Naming Context, Reference DC and Target DC lists by querying the local DC. Thorough detection does a more exhaustive search of all DCs and leverages DC Locator and DSBind calls. Note that Thorough detection will likely fail if one or more DCs are unreachable.

3. Take a quick walk through the UI:

Naming Context:


Reference DC:

the DC you will compare to the target DC. The reference DC hosts a writeable copy of the partition.


Note: ChildDC2 should not be listed here since it is an RODC, and RODCs are not valid reference DCs for lingering object removal.

The version of the tool is still in development and does not represent the finished product. In other words, expect crashes, quirks and everything else normally encountered with beta software.

Target DC:

the DC that lingering objects are to be removed from


4. Click


to use these DCs for the comparison. If you want to scan all partitions and all DCs: Leave all fields blank to have the entire environment scanned, and then click


The tool does a comparison amongst all DCs for all partitions in a pairwise fashion when all fields are left blank. In a large environment, this comparison will take a great deal of time (possibly even days) as the operation targets (n * (n-1)) number of DCs in the forest for all locally held partitions. For shorter, targeted operations, select a naming context, reference DC and target DC. The reference DC must hold a writable copy of the selected naming context. Note that clicking


does not actually stop the server-side API, it merely stops the work in the client-side tool.


During the scan, several buttons are disabled. The current count of lingering objects is displayed in the status bar at the bottom of the screen along with the current tool status. During this execution phase, the tool runs in an advisory mode and reads the event log data reported on each target DC.

Note: The Directory Service event log may completely fill up if the environment contains large numbers of lingering objects and the Directory Services event log is using its default maximum log size. The tool leverages the same lingering object discovery method as repadmin and repldiag, logging one event per lingering object found.


When the scan is complete, the status bar updates, buttons are re-enabled and total count of lingering objects is displayed. The Result pane at the bottom of the window updates with any errors encountered during the scan.

If you see error 1396 or Error 8440 in the status pane, you are using an early beta-preview version of the tool and should use the latest version.

Error 1396 is logged if the tool incorrectly used an RODC as a reference DC.

Error 8440 is logged when the targeted reference DC doesn't host a writable copy of the partition.

Lingering Object Liquidator discovery method
  • Leverages DRSReplicaVerifyObjects method in Advisory Mode
  • Runs for all DCs and all Partitions
  • Collects lingering object event ID 1946s and displays objects in main content pane
  • List can be exported to CSV for offline analysis (or modification for import)
  • Supports import and removal of objects from CSV import (leverage for objects not discoverable using DRSReplicaVerifyObjects)
  • Supports removal of objects by DRSReplicaVerifyObjects and LDAP rootDSE removeLingeringobjects modification

The tool leverages the Advisory Mode method exposed by


that both repadmin /removelingeringobjects /Advisory_Mode and repldiag /removelingeringobjects /advisorymode use. In addition to the normal

Advisory Mode

related events logged on each DC, it displays each of the lingering objects within the main content pane.


Results of the scan are logged in the Results pane. Many more details of all operations are logged in the


file in the same directory as the tool's executable.



button allows you to export a list of all lingering objects listed in the main pane into a CSV file. View the file in Excel, modify if necessary and use the


button later to view the objects without having to do a new scan. The Import feature is also useful if you discover abandoned objects (not discoverable with DRSReplicaVerifyObjects) that you need to remove. We briefly discuss abandoned objects later in this post.

A note about


lingering objects:

Garbage collection is an independent process which runs on each DC every 12 hours by default. One of its jobs is to remove objects that have been deleted and have existed as a tombstone for greater than the tombstone lifetime number of days. There is a rolling 12-hour period where an object eligible for garbage collection exists on some DCs but has already been removed by the garbage collection process on other DCs. These objects will also be reported as lingering object by the tool, however no action is required as they will automatically get removed the next time the garbage collector process runs on the DC.

Removal of individual objects

The tool allows you to remove objects a handful at a time, if desired, using the



5. To remove individual objects, you can select a single object or multi-select multiple objects using the Ctrl or SHIFT keys. (hold down the


key to select multiple objects, or the


key to select a range of objects) and then select





The status bar updates with the new count of lingering objects and the status of the removal operation:


Logging for removed objects

The tool dumps a list of attributes for each object before removal and logs this along with the results of the object removal in the


log file. This log file is in the same location as the tool's executable.


the obj DN: ;;CN=Dick Schenk,OU=R&D,DC=root,DC=contoso,DC=com

objectClass:top, person, organizationalPerson, user;

sn:Schenk ;


name:Dick Schenk;






cn:Dick Schenk;



distinguishedName:;;CN=Dick Schenk,OU=R&D,DC=root,DC=contoso,DC=com;

displayName:Dick Schenk ;








value is ::

Lingering Obj CN=Dick Schenk,OU=R&D,DC=root,DC=contoso,DC=com is removed from the directory, mod response result code = Success


RemoveLingeringObject returned Success

Removal of all objects


Remove All

button, removes all lingering objects from all DCs in the environment.


To remove all lingering objects from the environment:

1. Click the

Remove All

button. The status bar updates with the count of lingering objects removed. (the count may differ to the discovered amount due to a bug in the tool-this is a display issue only and the objects are actually removed)


2. Close the tool and reopen it so that the main content pane clears.

3. Click the


button and verify no lingering objects are found.


Abandoned object removal using the new tool

None of the currently available lingering object removal tools will identify a special sub-class of lingering objects referred to internally as, “Abandoned objects”.

An abandoned object is an object created on one DC that never got replicated to other DCs hosting a writable copy of the NC but does get replicated to DCs/GCs hosting a read-only copy of the NC. The originating DC goes offline prior to replicating the originating write to other DCs that contain a writable copy of the partition.

The lingering object liquidator tool does not currently discover abandoned objects automatically so a manual method is required.

1. Identify abandoned objects based on Oabvalidate and replication metadata output.

Abandoned objects can be removed with the LDAP RemoveLingeringObject rootDSE modify procedure, and so Lingering Objects Liquidator is able to remove these objects.

2. Build a CSV file for import into the tool. Once, they are visible in the tool, simply click the Remove button to get rid of them.

a. To create a Lingering Objects Liquidator tool importable CSV file:

Collect the data in a comma separated value (CSV) with the following data:

FQDN of RWDC CNAME of RWDC FQDN of DC to remove object from DN of the object Object GUID of the object DN of the object's partition

3. Once you have the file, open the

Lingering Objects

tool and select the


button, browse to the file and choose Open.


4. Select all objects and then choose




Review replication metadata to verify the objects were removed.


For those that want even more detail on lingering object , check out the following:

To prevent lingering objects:

  • Actively monitor for AD replication failures using a tool like the

    AD Replication Status

  • Resolve AD replication errors within tombstone lifetime number of days.
  • Ensure your DCs are operating in

    Strict Replication Consistency

  • Protect against large jumps in system time
  • Use only supported methods or procedures to restore DCs. Do not:
    • Restore backups older than TSL
    • Perform snapshot restores on pre Windows Server 2012 virtualized DCs on any virtualization platform
    • Perform snapshot restores on a Windows Server 2012 or later virtualized DC on a virtualization host that doesn't support VMGenerationID

If you want hands-on practice troubleshooting AD replication errors, check out my lab on

TechNet Virtual labs

. Alternatively, come to an instructor-led lab at TechEd Europe 2014. “EM-IL307 Troubleshooting Active Directory Replication Errors”

For hands-on practice troubleshooting AD lingering objects

: check out my lab from TechEd Europe 2014. ”

EM-IL400 Troubleshooting Active Directory Lingering Objects

12/8/2015 Update: This lab is now available from TechNet Virtual labs



Finally, if you would like access to a hands-on lab for in-depth lingering object troubleshooting; let us know in the comments.

Thank you,

Justin Turner and A. Conner

Update 2014/11/20 – Added link to TechEd Lingering objects hands-on


Update 2014/12/17 – Added text to indicate the lack of support in LOL for cleanup of Windows Server 2003 DCs

Update 2015/12/08 – Added link to new location of Lingering Object hands-on


Update 2016/08/01 – Updated LoL download


Update 2017/10/09 – Added download link for released version of the tool on the Microsoft Download Center


This article was originally published by Microsoft's Directory Services Team. You can find the original article here.