2008 r2 AD recycle bin
enable the recycle bin from the AD powershell module:
Enable-ADOptionalFeature –Identity ‘CN=Recycle Bin Feature,CN=Optional Features,CN=Directory Service,CN=Windows NT,CN=Services,CN=Configuration, DC=mydomain,DC=local’ –Scope ForestOrConfigurationSet –Target ‘mydomain.local’
restoring a single account:
Get-ADObject -Filter {displayName -eq “benny bat”} -IncludeDeletedObjects | Restore-ADObject
update 6/22/2012:
to verify the feature is enabled run
Get-ADOptionalFeature -Filter *
for the Recycle Bin feature, the “EnabledScopes” will be populated if it is enabled
further information:
http://technet.microsoft.com/en-us/library/dd392261%28WS.10%29.aspx