Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot create Tree domain with ADDomain Resource #692

Closed
girvenj opened this issue Jun 2, 2022 · 1 comment · Fixed by #705
Closed

Cannot create Tree domain with ADDomain Resource #692

girvenj opened this issue Jun 2, 2022 · 1 comment · Fixed by #705
Labels
enhancement The issue is an enhancement request. good first issue The issue should be easier to fix and can be taken up by a beginner to learn to contribute on GitHub

Comments

@girvenj
Copy link

girvenj commented Jun 2, 2022

Problem description

Child domain works great, but I cannot create a tree in an existing forest with the ADDomain Resource

Verbose logs

PowerShell DSC resource MSFT_ADDomain  failed to execute Set-TargetResource functionality with error message: The 
running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: 
Verification of prerequisites for Domain Controller promotion failed. The child domain name "onpremisestree.local" has 
an invalid format. This name may contain letters, numbers, and hyphens, but not spaces or periods.
Characters that are not allowed include: ! " # $ % & ( ) * + , ' / : ; < = > ? @ [ \ ] ^ ` { | } ~
 
    + CategoryInfo          : InvalidOperation: (:) [], CimException
    + FullyQualifiedErrorId : ProviderOperationExecutionFailure
    + PSComputerName        : LocalHost

DSC configuration

'TreeDomainController' {
  ADDomain PrimaryDC {
	  DomainName                    = $DomainDnsName
	  DomainNetBIOSName             = $DomainNetBIOSName
	  ParentDomainName              = $ParentDomainDNSName
	  Credential                    = $EaCredentials
	  SafemodeAdministratorPassword = $RestoreModeCredentials
	  DatabasePath                  = 'D:\NTDS'
	  LogPath                       = 'D:\NTDS'
	  SysvolPath                    = 'D:\SYSVOL'
	  DependsOn                     = '[User]AdministratorPassword'
  }

Suggested solution

Add "TreeDomain" as an options to install a domain into an exiting resource

https://github.com/dsccommunity/ActiveDirectoryDsc/blob/main/source/DSCResources/MSFT_ADDomain/MSFT_ADDomain.psm1#L477

Operating system the target node is running

OsName               : Microsoft Windows Server 2022 Datacenter
OsOperatingSystemSKU : DatacenterServerEdition
OsArchitecture       : 64-bit
WindowsVersion       : 2009
WindowsBuildLabEx    : 20348.1.amd64fre.fe_release.210507-1500
OsLanguage           : en-US
OsMuiLanguages       : {en-US}

PowerShell version and build the target node is running

Name                           Value
----                           -----
PSVersion                      5.1.20348.643
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.20348.643
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

ActiveDirectoryDsc version

Name               Version Path
----               ------- ----
ActiveDirectoryDsc 6.0.1   C:\Program Files\WindowsPowerShell\Modules\ActiveDirectoryDsc\6.0.1\ActiveDirectoryDsc.psd1
@johlju johlju added enhancement The issue is an enhancement request. help wanted The issue is up for grabs for anyone in the community. labels Jun 5, 2022
@johlju
Copy link
Member

johlju commented Jun 5, 2022

This is also tracked in #689.

@johlju johlju added the good first issue The issue should be easier to fix and can be taken up by a beginner to learn to contribute on GitHub label Jun 5, 2022
Borgquite added a commit to Borgquite/ActiveDirectoryDsc that referenced this issue Feb 13, 2024
johlju pushed a commit that referenced this issue Feb 14, 2024
- ADDomain
  - Added support for creating a Tree domain via the DomainType field
    (issue #689, issue #692).
@johlju johlju removed the help wanted The issue is up for grabs for anyone in the community. label Feb 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement The issue is an enhancement request. good first issue The issue should be easier to fix and can be taken up by a beginner to learn to contribute on GitHub
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants