Enables an Active Directory optional feature.



Enable-ADOptionalFeature [-WhatIf] [-Confirm] [-AuthType <ADAuthType>] [-Credential <PSCredential>] [-Identity] <ADOptionalFeature> [-PassThru] [-Scope] <ADOptionalFeatureScope> [-Server <String>] [-Target] <ADEntity> [<CommonParameters>]

Example 1: Enable the Recycle Bin feature for a forest

PS C:\> Enable-ADOptionalFeature -Identity 'Recycle Bin Feature' -ScopeForestOrConfigurationSet-Target 'bajajsons.com' -Server dc1

Then type :-y

Example 2: Enable the Recycle bin for an AD LDS instance
Enable-ADOptionalFeature -Identity 'Feature 1'-Scope ForestOrConfigurationSet -Target 'CN=Configuration,CN={0241853A-6BBF-48AA-8AE0-9C35D0C91B7B}' -Serverlds.fabrikam.com:50000

Set the ForestMode on an AD LDS instance


Set-ADObject -Identity "CN=Partitions,CN=Configuration,CN={4F971828-5BE4-4E94-B532-58F2BFB6A3A5}" -Replace @{"msDS-Behavior-Version"=4}

Comments