Get-ADObject -filter 'isDeleted -eq $true -and name -ne "Deleted Objects"' -includeDeletedObjects
Found the object in question and make note of the GUID parameter.
Deleted : True
DistinguishedName : CN=Test Account\0ADEL:a769525b-0ac1-40c6-9cb5-9cdd8d221435
,CN=Deleted Objects,DC=test,DC=local
Name : Test Account
DEL:a769525b-0ac1-40c6-9cb5-9cdd8d221435
ObjectClass : user
ObjectGUID : a769525b-0ac1-40c6-9cb5-9cdd8d221435
Use the command below with the GUID value.
Restore-ADObject -Identity 'a769525b-0ac1-40c6-9cb5-9cdd8d221435'
https://stealthbits.com/blog/active-directory-object-recovery-recycle-bin/
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.