Skip to main content

old Active Directory Recycle Bin Tool for recovering objects


Active Directory Recycle bin tool instead of using 2008 R2

ADRecycleBin.exe (Active Directory Recycle Bin) allows administrators to quickly restore deleted Active Directory objects via an easy to use GUI (Graphical User Interface). This is a free Active Directory Recycle Bin tool.


If you or a colleague happen to mistakenly delete an object in Active Directory the results can be disastrous. ADRecycleBin allows administrators to quickly find and restore deleted objects in Active Directory. If you are running Active Directory in Windows 2008 R2 native mode you can enable the Active Directory Recycle Bin. If you are running Active Directory in an earlier mode you can re-animate deleted objects.

  • Supports Windows 2008 R2 Active Directory Recycle Bin technology
  • Supports Object reanimation in earlier versions of Active Directory
  • Review deleted objects
  • Restore multiple objects at the same time

An Example
Consider the following scenario. We have some users, computers and a group in an Organization Unit called Richmond Hill:

A friend of mine I decide to delete an object i gnoring all of the prompts. First prompt:

As well as the second prompt:

To make things worse, the computer object was a very important shared PC with a ton of mission-critical applications, and without this object in Active Directory, no one can log on to this PC with their domain ID. So how do we get these deleted objects back?
Using ADRecycleBin.exe
Firstly, before you run ADRecycleBin.exe ensure that your account has the appropriate privileges to restore objects in Active Directory. You will want to run the tool in the same domain where you plan on restoring the objects. Launch ADRecycleBin.exe and click the Load Deleted Objects button:

Unless you intend on restoring other types of objects other than OUs, Users, Computer or groups, I recommend you leave the Load Filter checkboxes as the default. Then click the Load Deleted Objects button. This will load all of the deleted objects detected based on the Load Filter checkboxes:

To restore all of the objects from our Richmond Hill OU click on one of the child objects, for example, I have selected the group called: LDAP://CN=ROL-RichmondHill IT Managers\0ADEL:86249fc3-ca0e-4614-b258-65fb15ff9ab7,CN=Deleted Objects,DC=beta,DC=local. Then I right-click and select the Select All menu item:

This will check all of the siblings. Incidentally, selecting a child node will automatically check its parent. Once we have selected the objects we wish to bring back from the dead, we click the Restore Checked Objects button:

This will initiate the restore process. When this process is complete a new window will open showing us a summary of the Active Directory deleted objects that were restored:

From this window we can copy and paste the messages of importance or export the results to a csv file to let others know what was restored:

When we close the Restore Summary window the deleted objects will be enumerated again:

Our OU called Richmond Hill has now been successfully restored:


Restoring objects with

For windows server 2008 R2 there are a new feature of "Recycle pin" which is not our subject today.

A cool tool that allows you to easily restore deleted AD objects. The tool is provided as freeware and has no kind of support, but from what I've seen, it works great. Some of the tools features include:

  • Browsing the tombstones
  • Domain Controller targeting
  • Can be used with alternative credentials (convenient if you do not logon to your desktop as Domain Admin, which you should never do anyway)
  • User/Computer/OU/Container reanimation
  • Preview of tombstone attributes

Enumerating tombstones

Previewing the tombstone attributes

Restoring a deleted user account

For more information on Guy's tool, please see Guy's blog entry announcing
Restoring objects with Microsoft ADRestore (previously Sysinternals)

Formerly Sysinternals and now Microsoft, Mark Russinovich has created a command-line freeware application called ADRestore. The tool enumerates all of the currently tombstoned objects in a domain and allows you to restore them selectively, and provides a convenient command-line interface for using the Active Directory reanimation functionality. If you run it from the command line you will be prompted to choose which object you want to restore, and since there could be quite a few tombstoned objects, this process might take some time as you answer NO to each and every prompt.
To add a little selectivity to the restore operation, you can run ADRestore with a parameter to narrow down the search. For example:

adrestore -r daniel would search for all objects with "daniel" as part of its name.
The -r switch forces the program to prompt the user for each restoration. Otherwise, all the objects found matching said criteria will be automatically restored. The default (no criteria supplied) is that all tombstoned objects will be enumerated and restored.
Note that deleted items may no longer be members of specific organizational units or OUs. Restoring these objects from deleted status will not automatically restore them to their respective OUs; this will need to be done manually.
Download ADRestore
How to restore deleted user accounts and their group memberships in Active Directory - 840001


Popular posts from this blog

Recreating a missing VMFS datastore partition in VMware vSphere 5.x and 6.x

    Symptoms A datastore has become inaccessible. A VMFS partition table is missing.   Purpose The partition table is required only during a rescan. This means that the datastore may become inaccessible on a host during a rescan if the VMFS partition was deleted after the last rescan. The partition table is physically located on the LUN, so all vSphere hosts that have access to this LUN can see the change has taken place. However, only the hosts that do a rescan will be affected.   This article provides information on: Determining whether this is the same problem Resolving the problem   Cause This issue occurs because the VMFS partition can be deleted by deleting the datastore from the vSphere Client. This is prevented by the software, if the datastore is in use. It can also happen if a physical server has access to the LUN on the SAN and does an install, for example.   Resolution To resolve this issue: Run the  partedUtil  command on the host with the issues and verify if your output

ما هى ال FSMO Roles

  بأختصار ال FSMO Roles هى اختصار ل Flexible Single Operation Master و هى عباره عن 5 Roles فى ال Active Directory و هما بينقسموا لقسمين A - Forest Roles 1- Schema Master Role و هى ال Role اللى بتتحكم فى ال schema و بيكون فى Schema Master Role واحد فى ال Forest بيكون موجود على Domain Controller و بيتم التحكم فيها من خلال ال Active Directory Schema Snap in in MMC بس بعد ما يتعمل Schema Register بواسطه الامر التالى من ال Cmd regsvr32 schmmgmt.dll 2-Domin Naming Master و هى ال Role المسئوله عن تسميه ال Domains و بتتأكد ان مفيش 2 Domain ليهم نفس الاسم فى ال Forest و بيتم التحكم فيها من خلال ال Active Directory Domains & Trusts B- Domain Roles 1-PDC Emulator و هى ال Role اللى بتتحكم فى ال Password change فى ال domain و بتتحكم فى ال time synchronization و هى تعتبر المكان الافتراضى لل GPO's و هى تعتبر Domain Role مش زى الاتنين الاولانيين و بيتم التحكم فيها من خلال ال Active directory Users & Computers عن طريق عمل كليك يمين على اسم الدومين و نختار operations master فى تاب ال PDC Emu

Unlock the VMware VM vmdk file

  Unlock the VMware VM vmdk file Kill -9 PID Sometimes a file or set of files in a VMFS become locked and any attempts to edit them or delete will give a device or resource busy error, even though the vm associated with the files is not running. If the vm is running then you would need to stop the vm to manipulate the files. If you know that the vm is stopped then you need to find the ESX server that has the files locked and then stop the process that is locking the file(s). 1. Logon to the ESX host where the VM was last known to be running. 2.  vmkfstools -D /vmfs/volumes/path/to/file  to dump information on the file into /var/log/vmkernel 3.  less /var/log/vmkernel  and scroll to the bottom, you will see output like below: a. Nov 29 15:49:17 vm22 vmkernel: 2:00:15:18.435 cpu6:1038)FS3: 130: <START vmware-16.log> b. Nov 29 15:49:17 vm22 vmkernel: 2:00:15:18.435 cpu6:1038)Lock [type 10c00001 offset 30439424 v 21, hb offset 4154368 c. Nov 29 15:49:17 vm22 vmkernel: gen 664