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

Bug: MEMBER_ROOTCA.DSC.PS1 leaves the system with unvalid properties #354

Open
DennisL68 opened this issue Apr 16, 2020 · 1 comment
Open
Labels
help wanted The issue is up for grabs for anyone in the community. needs investigation The issue needs to be investigated by the maintainers or/and the community.

Comments

@DennisL68
Copy link

DennisL68 commented Apr 16, 2020

Verison of PowerShell: 
$PSVersionTable.PSVersion

Major  Minor  Build  Revision
-----  -----  -----  --------
5      1      17763  1007

PowerShell host:
Console

Operating system:
Get-CimInstance Win32_OperatingSystem | Select-Object Caption, Version, ServicePackMajorVersion, OSArchitecture, WindowsDirectory


Caption                 : Microsoft Windows Server 2019 Standard
Version                 : 10.0.17763
ServicePackMajorVersion : 0
OSArchitecture          : 64-bit
WindowsDirectory        : C:\Windows


Version of LabBuilder:
PS C:\Windows\system32> Get-Module -Name LabBuilder -ListAvailable


    Directory: C:\Program Files\WindowsPowerShell\Modules


ModuleType Version    Name                                ExportedCommands
---------- -------    ----                                ----------------
Script     1.0.5.105  LabBuilder                          {Get-LabResourceModule, Initialize-LabResourceModule, Get-...

When checking the state of the DC after deployment with Get-DscConfiguration an error is returned.

PS C:\Users\administrator.LABBUILDER> Get-DscConfiguration
Get-DscConfiguration : The PowerShell DSC resource  returned results that are not valid from Get-TargetResource. The
DSConfigDN key is not a valid property in the corresponding DSC resource schema file. The results from
Get-TargetResource must be in a Hashtable format. The keys in the Hashtable must be the same as the properties in the
corresponding DSC resource schema file.
At line:1 char:1
+ Get-DscConfiguration
+ ~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidResult: (MSFT_DSCLocalConfigurationManager:root/Microsoft/...gurationManager) [Ge
   t-DscConfiguration], CimException
    + FullyQualifiedErrorId : GetOperationResultInvalidResultFormat,Get-DscConfiguration

Also, Test-DscConfiguration fails.

Test-DscConfiguration -Detailed | select -ExpandProperty ResourcesNotInDesiredState | 
select ConfigurationName,InstanceName,ResourceName

ConfigurationName InstanceName  ResourceName
----------------- ------------  ------------
MEMBER_ROOTCA     ADCSAdvConfig Script

The configuration used for the CA:

<vm name="PKI"
        template="Template Windows Server 2019 b1903 - 1GB"
        computername="PKI"
        bootorder="20">
      
      <dsc configname="MEMBER_ROOTCA"
           configfile="MEMBER_ROOTCA.DSC.ps1">
        <parameters>
          DomainName = 'LABBUILDER.COM'
          DomainAdminPassword = 'Password!1'
          DCName = 'DC'
          PSDscAllowDomainUser = $true
          InstallRSATTools = $true

          CACommonName = 'LABBUILDER.COM Root CA'
          CADistinguishedNameSuffix = 'DC=LABBUILDER,DC=COM'
          CRLPublicationURLs = '65:C:\Windows\system32\CertSrv\CertEnroll\%3%8%9.crl\n79:ldap:///CN=%7%8,CN=%2,CN=CDP,CN=Public Key Services,CN=Services,%6%10\n6:http://pki.labbuilder.com/CertEnroll/%3%8%9.crl'
          CACertPublicationURLs = '1:C:\Windows\system32\CertSrv\CertEnroll\%1_%3%4.crt\n2:ldap:///CN=%7,CN=AIA,CN=Public Key Services,CN=Services,%6%11\n2:http://pki.labbuilder.com/CertEnroll/%1_%3%4.crt'
          CRLPeriodUnits = 52
          CRLPeriod = 'Weeks'
          CRLOverlapUnits = 12
          CRLOverlapPeriod = 'Hours'
          ValidityPeriodUnits = 10
          ValidityPeriod = 'Years'
          AuditFilter = 127
        </parameters>
      </dsc>

      <adapters>
        <adapter name="External"
          switchname="External">
        </adapter>
        <adapter name="Private"
          switchname="Private">
            <ipv4 address="192.168.11.3"
                subnetmask="24"
                dnsserver="192.168.11.2"/>
        </adapter>
      </adapters>
    </vm>
@PlagueHO
Copy link
Owner

This looks like it could be a bug in the ActiveDirectoryCSDsc resource. I'll need to log it and track it over there.

@PlagueHO PlagueHO added help wanted The issue is up for grabs for anyone in the community. needs investigation The issue needs to be investigated by the maintainers or/and the community. labels Apr 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted The issue is up for grabs for anyone in the community. needs investigation The issue needs to be investigated by the maintainers or/and the community.
Projects
None yet
Development

No branches or pull requests

2 participants