When we deploy Windows Server 2008 R2 forest functional level we will have additional feature:
- Recycle bin, which, when it is enabled, provides the ability to restore deleted objects when Active Directory services is running.

Let??s start test this feature:
1. Create “test” user.

2. Delete them.

3. Enable ??Recycle Bin Feature?, we do this only one for domain.
PS C:\Users\Administrator>
Enable-ADOptionalFeature -Identity 'CN=Recycle Bin Fe
ature,CN=Optional Features,CN=Directory Service,CN=Windows NT,CN=Services,CN=Con
figuration, DC=contoso,DC=gis' -Scope Forest -Target 'contoso.gis'
WARNING: Enabling Recycle Bin Feature on
CN=Partitions,CN=Configuration,DC=contoso,DC=gis is an irreversible action! You
will not be able to disable Recycle Bin Feature on
CN=Partitions,CN=Configuration,DC=contoso,DC=gis if you proceed.
Confirm
Are you sure you want to perform this action?
Performing operation "Enable" on Target "Recycle Bin Feature".
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help
(default is "Y"):y
4. Restore object:
PS C:\Users\Administrator> Get-ADObject -Filter {displayName -eq "Test Testowy"}
-IncludeDeletedObjects | Restore-ADObject
5. And now we are seeing that deleted object was restored.


