Viewing Deleted Objects
Once the Active Directory Recycle Bin is enabled, you can use either of two tools to view objects that have been deleted and placed in the Deleted Objects container:
- ldp.exe Lightweight Directory Access Protocol (LDAP) utility
- Active Directory Module for Windows PowerShell
Viewing Deleted Objects by Using the ldp.exe Utility
To view deleted objects by using the ldp.exe utility, follow these steps:
- Log onto a domain controller.
- Click Start > Run, type ldp.exe, and then click OK.
- On the Connection menu, select Connect.
- In the Connect dialog box (see Figure 4), type the name and domain controller in the forest root domain, and then click OK.
- On the Connection menu, select Bind.
- In the Bind dialog box (see Figure 5), select the "Bind as currently logged on user" option or the "Bind with credentials" option. Enter the credentials, if applicable. Click OK.
- On the View menu, select Tree.
- In the Tree View dialog box (see Figure 6), enter the distinguished name of the forest root domain, and then click OK.
- On the Options menu, select Controls.
- In the Controls dialog box (see Figure 7), open the Load Predefined drop-down list and select Return deleted objects. Click OK.
- Expand the forest root domain in the console tree, as shown in Figure 8. Double-click the "CN=Deleted Objects,DC=Domain,DC=local" node, where DC=Domain,DC=local is the distinguished name of your forest root domain.
Figure 4 Connect dialog box.
Figure 5 Bind dialog box.
Figure 6 Tree View dialog box.
Figure 7 Controls dialog box.
Figure 8 Deleted Objects container.
Any deleted objects will be visible in the Deleted Objects container. In Figure 8, the User1 object is visible because it was deleted after the Active Directory Recycle Bin feature was enabled.
Viewing Deleted Objects by Using the Active Directory Module for Windows PowerShell
To view deleted objects by using the Active Directory Module for Windows PowerShell:
- Log onto a domain controller.
- Click Start > All Programs > Administrative Tools > Active Directory Module for Windows PowerShell.
- In the Active Directory Module for Windows PowerShell window (see Figure 9), type the following command:
- Press Enter.
Get-ADObject -ldapFilter:"(msDS-LastKnownRDN=*)" -IncludeDeletedObjects
Figure 9 Viewing deleted objects by using the Active Directory Module for Windows PowerShell.
As Figure 9 shows, the deleted objects are listed.