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

This entry was written by resinblade , posted on Thursday September 30 2010at 04:09 pm , filed under IT . Bookmark the permalink . Post a comment below or leave a trackback: Trackback URL.

Leave a Reply

You must be logged in to post a comment.