by Danny Murphy
Download Lepide Object Restore
In This Article

In this quick guide, we will explain how to enable Active Directory Recycle Bin to restore deleted AD objects along with their attributes. Let’s get started!

Using the AD Recycle bin to Restore Deleted Objects

Authoritative restore is the preferred method for administrators to restore accidentally deleted or corrupted AD objects (such as users, groups, computer accounts, and OUs). With Windows Server R2, administrators were introduced to the Active Directory Recycle Bin. The active directory recycle bin can now be used to restore deleted objects from a hidden container called “deletedobjects”.

In the previous versions of active directory, most of the deleted objects were devoid of their attributes and resided in the “deletedobjects” container in “isrecycled” state. Therefore, if the object was not restored back from the “isdeleted” state (logical deletion state), all its attributes were lost.

However, with Active Directory recycle bin (ADRB) in Windows R2 Server, the attributes of deleted objects are reinstated, making the AD restoration process simpler and less time-consuming. But before you enable the AD Recycle Bin, some requirements must be met.

Requirements for Enabling the AD Recycle Bin

Firstly, the functional level of your environment must be set to Windows Server 2008 R2. In order to raise the functional levels, two methods can be used, viz., Set-ADForestMode Active Directory module cmdlet and Ldp.exe. The active directory schema must also be updated using the adprep.exe utility so that the pre-R2 domain controllers are not required before raising the functional levels.

Once the forest functional level of your environment is set to Windows Server 2008 R2, the Active Directory Recycle Bin can be enabled using one of below given two methods:

  1. Using Enable-ADOptionalFeature Cmdlet
  2. Using Ldp.exe

Enable Recycle Bin Using Enable-ADOptionalFeature Cmdlet

Below are the steps to enable Recycle Bin Using Enable-ADOptionalFeature Cmdlet

  1. Click Start, click Administrative Tools, right-click Active Directory Module for Windows PowerShell, and then click Run as administrator.
  2. At the Active Directory module for Windows PowerShell command prompt, type the following command, and then press ENTER:

    Enable-ADOptionalFeature –Identity ‘CN=Recycle Bin Feature,CN=Optional Features,CN=Directory Service,CN=Windows NT,CN=Services,CN=Configuration,DC=www,DC=domain,DC=com’ –Scope ForestOrConfigurationSet –Target ‘’

Enable Recycle Bin Using Ldp.exe

Below are the steps to enable Recycle Bin Using Ldp.exe

  1. To open Ldp.exe, click Start, click Run, and then type ldp.exe.
  2. To connect and bind to the server that hosts the forest root domain of your AD DS environment, under Connection, click Connect, and then click Bind.
  3. Click View, click Tree, in BaseDN, select the configuration directory partition, and then click OK.
  4. In the console tree, double-click the distinguished name of the configuration directory partition, and then navigate to the CN=Partitions container.
  5. Right-click the CN=Partitions container’s distinguished name, and then click Modify.
  6. In the Modify dialog box, make sure that the DN box is empty.
  7. In the Modify dialog box, in Edit Entry Attribute, type enableOptionalFeature.
  8. In the Modify dialog box, in Values, type


    Replace mydomain and com with the appropriate forest root domain name of your AD DS environment.

Lepide Object Restore – An Easier Way to Restore Deleted Objects

If you are unable to upgrade the functional level of your environment to R2 and you have to continue with your current Windows Server version, then there may be an easier way to ensure you are able to restore AD objects. As part of our Lepide Data Security Platform, we created Lepide Object Restore solution that allows you to restore deleted objects from the local domain complete with their attributes. Using this solution you won’t have to use different utilities to perform the restoration.

Download Lepide Object Restore