Skip to content

DnsServerADZone: Subsequent runs fail after the initial deployment succeeds #309

@danellisuk

Description

@danellisuk

Problem description

Using DSC v3 and the DnsServerADZone resource, the initial "config set" succeeds, but subsequent runs fail with "Exception: The parameter is incorrect. "

It appears that both ReplicationScope and DynamicUpdate are being passed to the Set-DnsServerPrimaryZone function. However these two params are part of different parameter sets.

Verbose logs

PS>CommandInvocation(Import-Module): "Import-Module"
>> ParameterBinding(Import-Module): name="Name"; value="C:\Program Files\WindowsPowerShell\Modules\DnsServerDsc\3.0.1\DscResources\DSC_DnsServerADZone"
>> ParameterBinding(Import-Module): name="PassThru"; value="True"


Name              : DSC_DnsServerADZone
Path              : C:\Program Files\WindowsPowerShell\Modules\DnsServerDsc\3.0
                    .1\DscResources\DSC_DnsServerADZone\DSC_DnsServerADZone.psm
                    1
Description       :
Guid              : 00000000-0000-0000-0000-000000000000
Version           : 0.0
ModuleBase        : C:\Program Files\WindowsPowerShell\Modules\DnsServerDsc\3.0
                    .1\DscResources\DSC_DnsServerADZone
ModuleType        : Script
PrivateData       :
AccessMode        : ReadWrite
ExportedAliases   : {[New-InvalidArgumentException,
                    New-InvalidArgumentException]}
ExportedCmdlets   : {}
ExportedFunctions : {[Assert-BoundParameter, Assert-BoundParameter],
                    [Assert-ElevatedUser, Assert-ElevatedUser],
                    [Assert-IPAddress, Assert-IPAddress], [Assert-Module,
                    Assert-Module]...}
ExportedVariables : {}
NestedModules     : {DscResource.Common}



PS>CommandInvocation(Set-TargetResource): "Set-TargetResource"
>> ParameterBinding(Set-TargetResource): name="Name"; value="10.168.192.in-addr.arpa"
>> ParameterBinding(Set-TargetResource): name="ReplicationScope"; value="Forest"
>> ParameterBinding(Set-TargetResource): name="Ensure"; value="Present"
>> ParameterBinding(Set-TargetResource): name="Verbose"; value="True"
>> ParameterBinding(Set-TargetResource): name="DynamicUpdate"; value="Secure"
>> ParameterBinding(Set-TargetResource): name="DirectoryPartitionName"; value=""
>> ParameterBinding(Set-TargetResource): name="ComputerName"; value=""
VERBOSE: Checking DNS server zone with name '10.168.192.in-addr.arpa' is 'Present'...
PS>TerminatingError(Set-DnsServerPrimaryZone): "The parameter is incorrect. "

DSC configuration

- name: DNS Server
    type: Microsoft.Windows/WindowsPowerShell
    properties:
      resources:
        - name: Reverse Lookup Zone
          type: DnsServerDsc/DnsServerADZone
          properties:
            Name: "10.168.192.in-addr.arpa"
            ReplicationScope: Forest
            Ensure: Present

Suggested solution

No solution currently. I'm new to DSC, but am keen to assist further as my knowledge grows.

Operating system the target node is running

OsName               : Microsoft Windows Server 2022 Standard
OsOperatingSystemSKU : StandardServerEdition
OsArchitecture       : 64-bit
WindowsVersion       : 2009
WindowsBuildLabEx    : 20348.2849.amd64fre.fe_release_svc_prod1.241101-1732
OsLanguage           : en-US
OsMuiLanguages       : {en-US}

PowerShell version and build the target node is running

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

DnsServerDsc version

Name         Version Path
----         ------- ----
DnsServerDsc 3.0.1   C:\Program Files\WindowsPowerShell\Modules\DnsServerDsc\3.0.1\DnsServerDsc.psd1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions