Sometimes it may be necessary to recover the deleted object of a domain which can be done from the AD recycle bin. By default, it is not enabled. So we have to enable recycle bin in active directory.
Table of Contents
Enabling recycle bin in active directory using ADAC
It can be done using Active Directory Administrative Center (ADAC). To enable from ADAC, go to tools under server manager and open ADAC, and then enable Recycle Bin.
Enabling recycle bin in active directory using active directory powershell module
It can also be done using the active directory powershell module. To do so run the following command.
#Using Active Directory Powershell Module
# To enable AD Recycle Bin we need the command
Enable-ADOptionalFeature 'Recycle Bin Feature' -Scope ForestOrConfigurationSet -Target tech-servepro.com
#To check the status
Get-ADOptionalFeature -filter *
Troubleshooting tips
Sometimes we may get the error: “The FSMO role ownership could not be verified because its directory partition has not replicated successfully with at least one replication partner”. This happens if there is an offline domain controller in the network. If the DC is not available anymore we need to clean the metadata of the offline DC. The process can be found here.
- KB170080