Base de conhecimento

How to Recover Deleted Objects Using the Active Directory Recycle Bin in Windows Server 2008 R2



Article Summary: This article provides information on using the Active Directory Recycle Bin to recover deleted objects in Windows Server 2008 R2.



For general information about the Active Directory Recycle Bin, see Information About the Active Directory Recycle Bin in Windows Server 2008 R2 and 2012.
For information on enabling the AD Recycle Bin, see How to Enable the Active Directory Recycle Bin in Windows Server 2008 R2.
For information on recovering deleted objects in Windows Server 2012, see How to Recover Deleted Objects Using the Active Directory Recycle Bin in Windows Server 2012.

Follow this procedure to restore a deleted object using Windows PowerShell:

  1. Run the Active Directory Module for Windows PowerShell as Administrator.
    Alternatively, run Windows PowerShell as Administrator and run the Import-Module ActiveDirectory cmdlet.
  2. Use the Get-ADObject and Restore-ADObject cmdlets to restore deleted objects. For example, to restore a user account with the display name John Doe, type the following:

    Get-ADObject -Filter {displayName -eq "John Doe"} -IncludeDeletedObjects | Restore-ADObject

    In this example, the Get-ADObject cmdlet searches for an object whose display name is John Doe. The -IncludeDeletedObjects parameter indicates that the search can include the Deleted Objects container. If a matching object is found, that object is sent to the Restore-ADObject cmdlet, which retrieves it from the Deleted Objects container and restores it to its previous location in AD. It is possible to restore multiple objects using the same cmdlets by specifying a filter that matches all of the objects to restore.

The Restore-ADObject cmdlet uses the lastKnownParent attribute of a deleted object to determine the location in AD to which it should be restored. To restore objects to a different location, use the -TargetPath parameter.

The location to which a deleted object is restored must be a "live" location; it cannot also be a deleted object. In other words, if a hierarchy of deleted objects must be restored, the highest-level object in the hierarchy must be restored first. For example, if an organizational unit (OU) named Sales is deleted along with all of the user accounts it contains, the Sales OU must be restored before the user accounts can be restored, unless the user accounts are restored to a different, valid location.
Detailed steps for restoring a hierarchy of deleted objects are given in Step 2: Restore a Deleted Active Directory Object. The same TechNet article also gives instructions for restoring deleted objects using the ldp.exe utility.




Quick Tips content is self-published by the Dell Support Professionals who resolve issues daily. In order to achieve a speedy publication, Quick Tips may represent only partial solutions or work-arounds that are still in development or pending further proof of successfully resolving an issue. As such Quick Tips have not been reviewed, validated or approved by Dell and should be used with appropriate caution. Dell shall not be liable for any loss, including but not limited to loss of data, loss of profit or loss of revenue, which customers may incur by following any procedure or advice set out in the Quick Tips.

ID do artigo: SLN156497

Data da última modificação: 09/04/2014 10:47 AM


Classifique este artigo

Preciso
Úteis
Fácil de entender
Este artigo foi útil?
Sim Não
Envie seus comentários
O comentário mostra um caractere inválido, os caracteres especiais não aceitos são <> () &#92;
Infelizmente, o nosso sistema de feedback está atualmente desativado. Tente novamente mais tarde.

Obrigado. Seu comentário foi enviado.