Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save Bytexionl/d6bd43b815e9f6ac41e23254bfc0f507 to your computer and use it in GitHub Desktop.
Save Bytexionl/d6bd43b815e9f6ac41e23254bfc0f507 to your computer and use it in GitHub Desktop.
How to Restore deleted AD User without AD Recycle Bin
Start Command Prompt as administrator
Type in ldp.exe and press Enter
Click Connection > Connect
Type in your domain controller (DC01.exoip.com)
Click OK
Click Connection > Bind
Select Bind as currently logged on user
Click OK
It successfully binds the currently logged on user
Click Option > Controls
Select Return recycled objects
Click OK
Click View > Tree
Select the BaseDN from the dropdown menu
Click OK
Expand your BaseDN (DC=exoip,DC=com)
Expand the Deleted Objects (CN=Deleted Objects,DC=exoip,DC=com)
Click the deleted user you want to restore (CN=Amanda Morgan)
Check the object user settings
Right-click the deleted user
Click Modify
Select Extended
Type isDeleted in Edit Entry Attribute
Select Delete under Operation
Click Enter
Get the deleted user distinguishedName and lastKnownParent and add these values together because you need them in the next step
****CN=Amanda Morgan,OU=IT,OU=Users,OU=Company,DC=exoip,DC=com****
Type distinguishedName in Edit Entry Attribute
Paste the copied values from the previous step in Values
Select Replace under Operation
Click Enter
Check the Entry List and verify that both entry attributes (isDeleted and distinguishedName) are added
Click Run
Check that the deleted user is modified without any errors
Verify that the deleted user is restored in Active Directory. You need to reset the password and enable the account.
@Bytexionl
Copy link
Author

Screenshot from 2024-09-17 09-21-29
Screenshot from 2024-09-17 09-21-56
Screenshot from 2024-09-17 09-22-10
Screenshot from 2024-09-17 09-23-00
Screenshot from 2024-09-17 09-23-34
Screenshot from 2024-09-17 09-23-45
Screenshot from 2024-09-17 09-24-11
Screenshot from 2024-09-17 09-24-52
Screenshot from 2024-09-17 09-25-09
Screenshot from 2024-09-17 09-25-25
Screenshot from 2024-09-17 09-25-36
Screenshot from 2024-09-17 09-25-48
Screenshot from 2024-09-17 09-26-01
Screenshot from 2024-09-17 09-26-18
Screenshot from 2024-09-17 09-26-33
Screenshot from 2024-09-17 09-26-50
Screenshot from 2024-09-17 09-27-00
Screenshot from 2024-09-17 09-27-14
Screenshot from 2024-09-17 09-27-23

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment