dsccommunity / dsccommunity/ActiveDirectoryDsc

ADDomain create Tree in existing forest fails - Test-TargetResource: SysVol does not exist

Open
#750 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug help wanted
Dominant language
PowerShell
Stars
388
Forks
141
PR merge metrics
No merged PRs in 30d

Description

Problem description

I'm using below config to create a Tree domain in an existing forest
Domain creation succeeds but after reboot the check is done to an invalid location of Sysvol

forest root domain name: ads.adlab.local
treedomain name: intranet.adlab.local

PowerShell DSC resource MSFT_ADDomain failed to execute Test-TargetResource
functionality with error message: System.InvalidOperationException: The expected SysVol Path
'C:\Windows\SYSVOL\sysvol\intranet.adlab.local.ads.adlab.local' does not exist. (ADD0011)

Verbose logs
VERBOSE: [2026-01-16 16:38:59Z] [VERBOSE] [SR04]: LCM:  [ End    Test     ]  [[ADDomain]ChildDomain]  in 0.5270 
seconds.
VERBOSE: [2026-01-16 16:38:59Z] [ERROR] PowerShell DSC resource MSFT_ADDomain  failed to execute Test-TargetResource 
functionality with error message: System.InvalidOperationException: The expected SysVol Path 
'C:\Windows\SYSVOL\sysvol\intranet.adlab.local.ads.adlab.local' does not exist. (ADD0011) 
VERBOSE: [2026-01-16 16:38:59Z] [VERBOSE] [SR04]:                            [] Consistency check completed.
DSC configuration
Configuration AddChildDomain {
param (
    [Parameter(Mandatory = $true)]
    [String]$dnsSuffix,

    [Parameter(Mandatory = $true)]
    [String]$netbiosName,

    [Parameter(Mandatory = $true)]
    [String]$netbiosNameParent,

    [Parameter(Mandatory = $true)]
    [ValidateNotNullorEmpty()]
    [System.Management.Automation.PSCredential]
    $Credential
)
    Import-DscResource -ModuleName PSDesiredStateConfiguration
    Import-DscResource -ModuleName ComputerManagementDsc -ModuleVersion "10.0.0"
    Import-DscResource -ModuleName ActiveDirectoryDsc -ModuleVersion "6.7.1"
    [System.Management.Automation.PSCredential]$ParentDomainCreds = New-Object System.Management.Automation.PSCredential ("$($Credential.UserName)@$netbiosNameParent.$dnsSuffix", $Credential.Password)

    Node localhost
    {
        LocalConfigurationManager
        {
            ActionAfterReboot = 'ContinueConfiguration'
            ConfigurationMode = 'ApplyOnly'
            RebootNodeIfNeeded = $true
        }

        WindowsFeature RSAT
        {
            Ensure = "Present"
            Name = "RSAT"
        }

        WindowsFeature ADDSInstall
        {
            Ensure = "Present"
            Name = "AD-Domain-Services"
        }

        ADDomain ChildDomain
        {
            DomainName                    = "$netbiosName.$dnsSuffix"
            DomainNetbiosName             = $netbiosName
            ParentDomainName              = "$netbiosNameParent.$dnsSuffix"
            Credential                    = $ParentDomainCreds
            SafeModeAdministratorPassword = $Credential
            DomainType                    = 'TreeDomain'
            DependsOn = "[WindowsFeature]ADDSInstall"
        }

        PendingReboot Reboot1 
        { 
            Name = "RebootServer" 
            DependsOn = "[ADDomain]ChildDomain"
        }
    }
}
Suggested solution

Test-TargetResource is somehow looking in the wrong place. seems to concatenate forest root fqdn to the domain fqdn
the correct location is C:\WINDOWS\SYSVOL\sysvol\#domain fqdn*

Operating system the target node is running
Windows server 2025
PowerShell version and build the target node is running
5
ActiveDirectoryDsc version
6.7.1

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the ADDomain resource's Test-TargetResource entry point and reproduce the TreeDomain configuration using ActiveDirectoryDsc 6.7.1 on Windows Server 2025. Trace how the expected SysVol path is formed for a child tree domain in an existing forest. Done means the consistency check uses the child domain's actual SYSVOL path and succeeds after reboot.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell
Domain
infrastructure
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.