Tag Archives: object

To restore a single, deleted Active Directory object using the Get-ADObject and Restore-ADObject cmdlets

 

To restore a single, deleted Active Directory object using the Get-ADObject and Restore-ADObject cmdlets

  1. Click Start, click Administrative Tools, right-click Active Directory Module for Windows PowerShell, and then click Run as administrator.
  2. At the Active Directory module for Windows PowerShell command prompt, type the following command, and then press ENTER:

    Get-ADObject -Filter {String} -IncludeDeletedObjects | Restore-ADObject

    For example, if you want to restore an accidentally deleted user object with the display name Mary, type the following command, and then press ENTER:

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