ANAVEM
Reference
Languagefr
Enable Active Directory Recycle Bin on Windows Server 2022

Enable Active Directory Recycle Bin on Windows Server 2022

Enable and configure Active Directory Recycle Bin to recover deleted AD objects without backups. Learn both PowerShell and GUI methods with verification steps.

Emanuel DE ALMEIDA
3/13/2026 15 min 0
mediumactive-directory 8 steps 15 min

Overview

The Active Directory Recycle Bin is a critical feature that allows administrators to recover accidentally deleted AD objects — such as users, groups, and OUs — without requiring a full backup restoration or authoritative restore procedure.

This tutorial covers both PowerShell and GUI-based methods to enable and configure the AD Recycle Bin on Windows Server 2022, including prerequisite verification, activation steps, and how to restore deleted objects once the feature is enabled.

Implementation Guide

Full Procedure

01

Verify Prerequisites and Forest Functional Level

Before enabling the Recycle Bin, check your forest meets the minimum requirements. Open an elevated PowerShell session and verify your forest functional level.

Import-Module ActiveDirectory
Get-ADForest | Format-List FunctionalLevel

The output should show Windows2008R2Forest or higher. If it shows Windows2008Forest or lower, you'll need to raise the functional level first.

Next, verify your schema version meets requirements:

Get-ADObject (Get-ADRootDSE).schemaNamingContext -Property objectVersion

The objectVersion should be 47 or higher. Also check that all domain controllers are replicating properly:

repadmin /showrepl
Warning: Enabling AD Recycle Bin is irreversible. Once enabled, you cannot disable it. All existing tombstone objects will be permanently deleted when you enable the feature.
02

Enable Recycle Bin Using Active Directory Administrative Center

The GUI method is straightforward and provides visual confirmation. Open Server Manager and navigate to Tools > Active Directory Administrative Center, or run dsac.exe from an elevated command prompt.

In ADAC, select your domain from the left navigation pane. If your domain isn't visible, click Manage > Add Navigation Nodes and add your domain.

In the Tasks pane on the right, click Enable Recycle Bin. You'll see a warning dialog explaining that this action is irreversible and will delete existing tombstone objects. Click OK to proceed.

A second dialog will appear asking you to refresh the Administrative Center. Click OK and then press F5 or click the refresh icon.

Verification: After refreshing, the "Enable Recycle Bin" option should be grayed out, and you should see a new "Deleted Objects" container in your domain navigation.

Pro tip: If you have multiple domains in your forest, enabling the Recycle Bin in one domain automatically enables it forest-wide for all domains.
03

Enable Recycle Bin Using PowerShell Commands

For automation or when GUI access isn't available, use PowerShell. First, get your forest root domain name and distinguished name:

$ForestDN = (Get-ADRootDSE).rootDomainNamingContext
$ForestName = (Get-ADForest).Name
Write-Host "Forest DN: $ForestDN"
Write-Host "Forest Name: $ForestName"

Now enable the Recycle Bin feature using the Enable-ADOptionalFeature cmdlet:

Enable-ADOptionalFeature -Identity "CN=Recycle Bin Feature,CN=Optional Features,CN=Directory Service,CN=Services,CN=Configuration,$ForestDN" -Scope ForestOrConfigurationSet -Target $ForestName

When prompted, type Y and press Enter to confirm the irreversible operation.

Verification: Check that the feature is enabled:

Get-ADOptionalFeature -Filter 'Name -eq "Recycle Bin Feature"' | Format-List Name,EnabledScopes

The EnabledScopes should show your forest DN, confirming successful activation.

04

Configure Deleted Object Lifetime Settings

By default, deleted objects remain in the Recycle Bin for 180 days (deletedObjectLifetime). You can modify this value based on your organization's needs. Check the current setting:

Get-ADObject "CN=Directory Service,CN=Services,CN=Configuration,$((Get-ADRootDSE).configurationNamingContext)" -Properties deletedObjectLifetime | Format-List deletedObjectLifetime

If the value is <not set>, it defaults to 180 days. To modify it (for example, to 365 days):

Set-ADObject "CN=Directory Service,CN=Services,CN=Configuration,$((Get-ADRootDSE).configurationNamingContext)" -Replace @{deletedObjectLifetime=365}

Also check the tombstone lifetime, which determines when objects are permanently purged:

Get-ADObject "CN=Directory Service,CN=Services,CN=Configuration,$((Get-ADRootDSE).configurationNamingContext)" -Properties tombstoneLifetime | Format-List tombstoneLifetime

The tombstone lifetime should be longer than the deleted object lifetime to ensure proper cleanup.

Pro tip: Set deletedObjectLifetime to match your backup retention policy. This ensures you have multiple recovery options available.
05

Test Object Deletion and Recovery via GUI

Create a test organizational unit to verify the Recycle Bin functionality. In ADAC, right-click your domain and select New > Organizational Unit. Name it "Test-RecycleBin-OU".

After creating the OU, right-click it and select Delete. Confirm the deletion when prompted.

Now navigate to the Deleted Objects container in ADAC. You should see your deleted OU listed with a red X icon and additional attributes showing when it was deleted.

To restore the object, right-click the deleted OU and select Restore. The object will be restored to its original location. Alternatively, select "Restore To" to choose a different parent container.

Verification: Navigate back to your domain root and confirm the OU has been restored with all its original properties intact.

Clean up by deleting the test OU again (you can leave it in Deleted Objects for future testing).

06

Recover Deleted Objects Using PowerShell

PowerShell provides more flexibility for bulk operations and scripting. To view all deleted objects in your domain:

Get-ADObject -Filter 'isDeleted -eq $true' -IncludeDeletedObjects -Properties Name,Deleted,LastKnownParent | Format-Table Name,Deleted,LastKnownParent -AutoSize

To restore a specific object by name (replace "Test-RecycleBin-OU" with your object name):

Get-ADObject -Filter 'isDeleted -eq $true -and Name -eq "Test-RecycleBin-OU"' -IncludeDeletedObjects | Restore-ADObject

For more complex scenarios, you can restore objects to different locations:

$DeletedObject = Get-ADObject -Filter 'isDeleted -eq $true -and Name -eq "Test-RecycleBin-OU"' -IncludeDeletedObjects
Restore-ADObject -Identity $DeletedObject -TargetPath "OU=Restored,DC=yourdomain,DC=com"

To restore all objects deleted within the last 24 hours:

$Yesterday = (Get-Date).AddDays(-1)
Get-ADObject -Filter 'isDeleted -eq $true' -IncludeDeletedObjects -Properties Deleted | Where-Object {$_.Deleted -gt $Yesterday} | Restore-ADObject

Verification: Use Get-ADObject without the -IncludeDeletedObjects parameter to confirm restored objects are visible in normal AD queries.

07

Monitor and Maintain the Recycle Bin

Regular monitoring ensures the Recycle Bin functions properly and doesn't consume excessive space. Create a monitoring script to check deleted objects count and age:

$DeletedObjects = Get-ADObject -Filter 'isDeleted -eq $true' -IncludeDeletedObjects -Properties Name,Deleted,objectClass
$TotalCount = $DeletedObjects.Count
$OldObjects = $DeletedObjects | Where-Object {$_.Deleted -lt (Get-Date).AddDays(-150)}

Write-Host "Total deleted objects: $TotalCount"
Write-Host "Objects older than 150 days: $($OldObjects.Count)"

# Group by object type
$DeletedObjects | Group-Object objectClass | Sort-Object Count -Descending | Format-Table Name,Count

Set up a scheduled task to run this script weekly and alert administrators if the count grows unexpectedly large.

Monitor replication health to ensure deleted objects replicate properly across all domain controllers:

repadmin /replsummary

Check for any replication errors that might affect Recycle Bin functionality:

repadmin /showrepl * /errorsonly
Warning: Large numbers of deleted objects can impact AD performance. Consider purging very old deleted objects if your Recycle Bin contains thousands of items and you have adequate backup coverage.
08

Implement Backup Strategy and Best Practices

While the Recycle Bin provides excellent protection against accidental deletions, maintain a comprehensive backup strategy. The Recycle Bin doesn't protect against:

  • Corruption of AD database
  • Malicious bulk deletions that exceed your retention period
  • Attribute modifications (only deletions are protected)

Configure Windows Server Backup to create regular system state backups:

wbadmin start systemstatebackup -backupTarget:E: -quiet

Document your recovery procedures and train your team on both Recycle Bin recovery and authoritative restore procedures. Create a recovery runbook that includes:

  • Steps to identify deleted objects
  • PowerShell commands for bulk recovery
  • Escalation procedures for complex scenarios
  • Contact information for senior administrators

Test your recovery procedures quarterly by deliberately deleting test objects and recovering them using both GUI and PowerShell methods.

Verification: Ensure your backup strategy covers both Recycle Bin recovery and traditional authoritative restore scenarios. Test restore procedures in a lab environment before implementing in production.

Pro tip: Create PowerShell functions for common recovery tasks and store them in your PowerShell profile. This speeds up recovery operations during stressful situations.

Frequently Asked Questions

Can you disable Active Directory Recycle Bin after enabling it?+
No, enabling Active Directory Recycle Bin is completely irreversible. Once activated, you cannot disable the feature. This is by design to prevent accidental loss of the recovery capability. Plan carefully before enabling, as all existing tombstone objects will be permanently deleted during activation.
What happens to existing deleted objects when you enable AD Recycle Bin?+
All existing tombstone objects are immediately and permanently deleted when you enable the Recycle Bin feature. Only objects deleted after enabling the Recycle Bin will be recoverable. If you have important deleted objects in tombstone state, recover them using traditional methods before enabling the feature.
How long are deleted objects retained in Active Directory Recycle Bin?+
By default, deleted objects are retained for 180 days (deletedObjectLifetime). You can modify this value using PowerShell to extend or reduce the retention period based on your organization's needs. The tombstone lifetime should always be longer than the deleted object lifetime for proper cleanup.
What forest functional level is required for Active Directory Recycle Bin?+
Active Directory Recycle Bin requires a minimum forest functional level of Windows Server 2008 R2. Additionally, the AD schema version must be 47 or higher. You can check your current functional level using Get-ADForest and verify schema version with Get-ADObject commands in PowerShell.
Does Active Directory Recycle Bin work across multiple domains in a forest?+
Yes, enabling the Recycle Bin in any domain automatically activates it forest-wide for all domains. You only need to enable it once per forest, not per domain. However, you must have appropriate permissions (Domain Admins or Enterprise Admins) to perform the activation operation.
Emanuel DE ALMEIDA
Written by

Emanuel DE ALMEIDA

Microsoft MCSA-certified Cloud Architect | Fortinet-focused. I modernize cloud, hybrid & on-prem infrastructure for reliability, security, performance and cost control - sharing field-tested ops & troubleshooting.

Discussion

Share your thoughts and insights

You must be logged in to comment.

Loading comments...