-
Notifications
You must be signed in to change notification settings - Fork 141
ADOptionalFeature
dscbot edited this page Aug 24, 2023
·
3 revisions
Parameter | Attribute | DataType | Description | Allowed Values |
---|---|---|---|---|
ForestFQDN | Key | String | Specifies the target Active Directory forest for the change. | |
FeatureName | Key | String | Specifies the feature to be activated | |
EnterpriseAdministratorCredential | Required | PSCredential | Specifies the user account credentials to use to perform this task. | |
Enabled | Read | Boolean | Shows the current state of the feature i.e. enabled or not |
The ADOptionalFeature DSC resource will enable the Active Directory Optional Feature of choice for the target forest. This resource first verifies that the forest and domain modes match or exceed the requirements. If the forest or domain mode is insufficient, then the resource will exit with an error message. The change is executed against the Domain Naming Master FSMO of the forest.
- Target machine must be running Windows Server 2008 R2 or later, depending on the feature.
This configuration will enable the Active Directory Recycle Bin for a specified Domain
Configuration ADOptionalFeature_EnableADRecycleBin_Config
{
param
(
[Parameter(Mandatory = $true)]
[System.String]
$ForestFQDN,
[Parameter(Mandatory = $true)]
[System.Management.Automation.PSCredential]
$EnterpriseAdministratorCredential
)
Import-DscResource -Module ActiveDirectoryDsc
Node localhost
{
ADOptionalFeature RecycleBin
{
FeatureName = "Recycle Bin Feature"
EnterpriseAdministratorCredential = $EnterpriseAdministratorCredential
ForestFQDN = $ForestFQDN
}
}
}
- ADComputer
- ADDomain
- ADDomainController
- ADDomainControllerProperties
- ADDomainDefaultPasswordPolicy
- ADDomainFunctionalLevel
- ADDomainTrust
- ADFineGrainedPasswordPolicy
- ADForestFunctionalLevel
- ADForestProperties
- ADGroup
- ADKDSKey
- ADManagedServiceAccount
- ADObjectEnabledState
- ADObjectPermissionEntry
- ADOptionalFeature
- ADOrganizationalUnit
- ADReadOnlyDomainControllerAccount
- ADReplicationSite
- ADReplicationSiteLink
- ADReplicationSubnet
- ADServicePrincipalName
- ADUser
- Home
- WaitForADDomain