How To Enable Active Directory Recycle Bin With PowerShell

In Windows Server 2016 by default the Active Directory Recycle Bin is disabled. You can not recover the deleted objects without Active Directory Recycle Bin enabled. If you want to secure Active Directory environment from deletion of nonrecoverable objects, first you should enable Active Directory Recycle bin. To perform this action, the AD forest functional level must set at least to Windows Server 2008 R2.

Check Active Directory Domain and Forest functional level

You can check the Forest and Domain functional with the following PowerShell cmdlets:

Check if Active Directory Recycle Bin is enabled

Use the following PowerShell cmdlet to check if the Active Directory Recycle Bin is enabled or not:

Check the EnabledScopes. In my case the Active Directory Recycle Bin is not enabled because the EnabledScopes is empty.

Enable the Active Directory Recycle Bin

Logon to your Domain Controller and import the Active Directory module with the following PowerShell command:

Run the following cmdlet to enable the Active Directory Recycle Bin:

Enter “Y” to perform this action.

Use the following PowerShell command to verify the Active Directory Recycle Bin is enabled:

Check the EnabledScopes. In my case the Active Directory Recycle Bin is now enabled because the EnabledScopes is not empty.

Thank you for spending some time at my site and in my blog. I hope you come to visit again soon 😉

About Lex van der Horst 201 Articles
Techwire

Be the first to comment

Leave a Reply