Skip to main content

Active Directory RecycleBin

Author
John Billekens
Technical Consultant | End User Computing

Requirements:

  • At least one Domain Controller running Windows Server 2012 with the Active Directory Administrative Center enabled.
  • All Domain Controllers (or servers running AD LDS) must be running Windows Server 2008 R2 or higher.
  • The Forest must be running at Windows Server 2008 R2 functional level.

Import the Active Directory modules in PowerShell

Import-Module ActiveDirectory

Forest Functional Level

Get-ADForest yourdomain.local
Set-ADForestMode -Identity yourdomain.local -ForestMode Windows2008R2Forest

Enable RecycleBin

Enable-ADOptionalFeature Identity 'CN=Recycle Bin Feature,CN=Optional Features,CN=Directory Service,CN=Windows NT,CN=Services,CN=Configuration,DC=DC01,DC=yourdomain,DC=local' Scope ForestOrConfigurationSet Target 'dc01.yourdomain.local'
Enable-ADOptionalFeature "Recycle Bin Feature" -Scope ForestOrConfigurationSet -Target (Get-ADDomain).DnsRoot.ToString()