ActiveDirectoryDsc
ActiveDirectoryDsc copied to clipboard
ADDomain: Add ability to specify DomainType to support TreeDomain use cases
Problem description
To support use cases where a regional domain acts as a forest root domain (see Selecting the Forest Root Domain for more information) we need the ability to specify the DomainType separately.
Verbose logs
N/A
DSC configuration
N/A
Suggested solution
We need the ability to specify the DomainType, for example:
Configuration ADDomain_NewTreeDomain_Config
{
param
(
[Parameter(Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[System.Management.Automation.PSCredential]
$Credential,
[Parameter(Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[System.Management.Automation.PSCredential]
$SafeModePassword
)
Import-DscResource -ModuleName PSDesiredStateConfiguration
Import-DscResource -ModuleName ActiveDirectoryDsc
node 'localhost'
{
WindowsFeature 'ADDS'
{
Name = 'AD-Domain-Services'
Ensure = 'Present'
}
WindowsFeature 'RSAT'
{
Name = 'RSAT-AD-PowerShell'
Ensure = 'Present'
}
ADDomain 'child'
{
DomainName = 'branch.contoso.com'
Credential = $Credential
SafemodeAdministratorPassword = $SafeModePassword
DomainMode = 'WinThreshold'
ParentDomainName = 'hq.contoso.com'
DomainType = 'TreeDomain'
}
}
}
Operating system the target node is running
N/A
PowerShell version and build the target node is running
N/A
ActiveDirectoryDsc version
N/A
Tagged it so that someone in the community can run with it. Looking forward to review a PR for this.
More information in #692.