How to Restore deleted Active Directory Objects for an User.

You have deleted some objects for an user in Active Directory ?

There is no need to worry regarding it as there is a trick to restore the active directory object. Please note that it only works if:

  • The forest functional level is 2008 R2 (only if all domain controllers are running Windows 2008 R2)
  • The Active Directory Recycle Bin was enabled before the object was deleted.

If both the above conditions are satisfied then you can restore the Active Directory Object using the following command:

Get-ADObject -Filter {samaccountname -like '*linwin*'} -IncludeDeletedObjects -Server domaincontroller_name | Restore-ADObject -PassThru

No comments:

Post a Comment

Thank You.

https://linwintech.blogspot.com/