none
How to restore deleted active directory user account from active directory recycle bin in windows server 2008 r2?

    Question

  • Can anyone instruct me on how to restore a deleted active directory user account from the AD recycle bin. I know you have to use poershell. I just need the proper script to get it done. Thanks.
    • Moved by Tim QuanModerator Tuesday, April 05, 2011 1:13 AM (From:Backup – Windows and Windows Server)
    Monday, April 04, 2011 3:59 PM

Answers

All replies

  • Hello,

    so AD recycle bin is enabled in the domain, otherwise it will not work?

    See here about using AD recycle bin: http://technet.microsoft.com/en-us/library/dd392261(WS.10).aspx

    In your case for the deleted object: http://technet.microsoft.com/en-us/library/dd379509(WS.10).aspx


    Best regards Meinolf Weber Disclaimer: This posting is provided "AS IS" with no warranties or guarantees , and confers no rights.
    Tuesday, April 05, 2011 6:17 AM
  • The permission required is enterprise admin & domain admin membership to recover deleted objects.

    AD recycle bin object restore step by step.

    http://www.simple-talk.com/sysadmin/exchange/the-active-directory-recycle-bin-in-windows-server-2008-r2/

    You can use PowerGUI tool to recover deleted object from AD recycle Bin.

    http://www.windowsreference.com/windows-server-2008/recover-deleted-active-directory-objects-with-the-ad-recycle-bin-powerpack/

    For authoritative restore, you need valid system state backup.

    http://support.microsoft.com/kb/840001

     

    Regards


    Awinish Vishwakarma| MY Blog

    Disclaimer: This posting is provided AS-IS with no warranties or guarantees and confers no rights.

    Tuesday, April 05, 2011 6:38 AM
  • How can I restore all objects in OU using AD Module for Windows Power Shell?

    Example:

    In OU "Enterprise" there're some users, in OU "Enterprise" there're two others OU's "Branch01 and Branch02"

    which command do I have to use?

    get-adobject ......


    Fernando | Analista de Redes

    Wednesday, May 15, 2013 8:54 PM
  • Hi Fernando,

    First of all please let me know whether you have deleted the two OU's (or) you have deleted only the objects within that OU.

    In case if you have deleted only the objects within that OU if you are trying to restore all the objects from OU "Enterprise" as well as OU's "Branch01 and Branch02" at the same time, please read the below explanation.

    All the Deleted objects in Active directory are stored within the Deleted Objects container(In case of Recycle Bin feature Turned OFF)

    The Deleted Objects container displays all logically deleted objects in a flat hierarchy as its direct children. So it will not have the same hierarchical model as you had in Active Directory. In this case If you want to restore all the Deleted objects within a OU, you have to just add a filter in the Get-ADObject cmdlet which specifies the lastKnownParent of the objects to be restored.

    In your case, If you want to restore the Objects within the "Enterprise" OU's, then the lastKnownParent value of the objects within that OU are "Enterprise"(OU from which the User account was deleted).

    cmdlet,

    Get-ADObject -SearchBase "CN=Deleted Objects,DC=Domain,DC=com" -Filter {lastKnownParent -eq "OU=Enterprise,DC=Domain,DC=com"} -IncludeDeletedObjects | Restore-ADObject

    • Proposed as answer by Krish Mural Friday, July 12, 2013 6:59 AM
    Thursday, July 11, 2013 4:22 AM
  • I need to restore one deleted object under OU=Users. The LDP does not show the original name of the deleted object, Albany CR, in the Deleted Objects OU.

    I tried this command just to list the deleted objects in Users, and it did not display any entries (no errors):

    PS C:\Windows\system32> Get-ADObject -searchbase "CN=Deleted Objects,DC=obg,DC=corp" -filter {lastKnownParent -eq "OU=Users,DC=obg,DC=corp"} -IncludeDeletedObjects

    PS C:\Windows\system32>

    Am I doing this incorrectly?


    Lou H.

    Wednesday, January 22, 2014 7:01 PM