In order to make recovery of Active Directory objects very simple in Microsoft Server 2016 and beyond you must enable the recycle bin, because by default the Active Directory recycle bin is turned off. To accomplish this, you need to open the Active Directory Administrative Center and click the "Enable Recycle Bin" link on the right as seen below.
Enabling the Active Directory Recycling Bin
Next you will be prompted to refresh the Active Directory Administrative Center
Using PowerShell to enable Active Directory Recycle Bin
New Deleted Objects Folder
Now when you delete AD objects they will be sent to this folder. This is where you can recover all deleted objects. You must allow your domain controllers replicate the enabling of the recycle bin before using it.
You can read more about this on Microsoft's documentation website
We are your Microsoft Server professionals. If you need assistance with your Microsoft Server, give us a call today!