GithubHelp home page GithubHelp logo

dsccommunity / dscworkshop Goto Github PK

View Code? Open in Web Editor NEW
202.0 22.0 164.0 27.6 MB

Blueprint for a full featured DSC project for Push / Pull with or without CI/CD

License: MIT License

PowerShell 100.00%
dsc workshop psconf psconfeu cicd azuredevops powershell dsc-pipeline automatedlab infrastructure dsc-artefacts dsc-reporting

dscworkshop's Introduction

DSC Workshop Overview

Build Status Last Commit
Develop Build status dev GitHub last commit
Master Build status GitHub last commit

GitHub issues

Abstract

This project serves as a blueprint for projects utilizing DSC in a medium or complex scope. It comes with a single build script to create all DSC artifacts for push or pull scenarios with the most flexible and scalable solution to manage configuration data.

This project does not use DSC as an isolated technology. DSC is just one part in a pipeline that leverages a few Microsoft products and open-source.

There is a fast-track learning path in Exercises

Credits

This project is inspired by Gael Colas' DscInfraSample and Gael's opinions have an impact on its evolution.

The overall concept follows The Release Pipeline Model, a whitepaper written by Michael Greene and Steven Murawski that is a must-read and describing itself like this:

There are benefits to be gained when patterns and practices from developer techniques are applied to operations. Notably, a fully automated solution where infrastructure is managed as code and all changes are automatically validated before reaching production. This is a process shift that is recognized among industry innovators. For organizations already leveraging these processes, it should be clear how to leverage Microsoft platforms. For organizations that are new to the topic, it should be clear how to bring this process to your environment and what it means to your organizational culture. This document explains the components of a Release Pipeline for configuration as code, the value to operations, and solutions that are used when designing a new Release Pipeline architecture.

Technical Summary

In the past few years many projects using DSC have not produced the desired output or have even failed. One of the main reasons is the tooling required to automate the process of building the DSC artifacts (MOF, Meta MOF, Compresses Modules) and automated testing is not implemented.

One of the goals of this project is to manage the complexity that comes with DSC. The needs to be proper tooling that solves these issues:

  • Configuration Management must be flexible and scalable. The DSC documentation is technically correct but does not lead people the right way. If one follows Using configuration data in DSC and Separating configuration and environment data, the outcome will be unmanageable if the configuration data gets more complex like dealing with roles, differences between locations and / or environments.. The solution to this problem is Datum, which is described in detail in the Exercises.
  • Building the solution and creating the artifacts requires a Single Build Script. This get very difficult if the build process has any manual steps or preparations that need to be done. After you have done your changes and want to create new artifacts, running the Build.ps1 script. This build script runs locally or inside a release pipeline (tested on Azure DevOps, Azure DevOps Sever, AppVeyor, GitLab).
  • The lack of Dependency Resolution makes it impossible to move a solution from local build to a CI/CD pipeline. Many DSC solutions require downloading a bunch of dependencies prior being able to run the build. This project uses PSDepend to download all required resources from either the PowerShell gallery or your internal repository feed.
  • Automated Testing is essential to verify the integrity of the configuration data. This project uses Pester for this. Additionally, the artifacts must be tested in the development as well as the test environment prior deploying them to them to the production environment. This process should be fully automated as well.

Getting started

Getting into the details does not cost much time and does not require a complex lab infrastructure. You should start with the Exercises - Task 2 on your personal computer. If you need to recap some DSC basics, go to Exercises - Task 1. Later in the exercises a free Azure DevOps account is needed and to finish the last exercises also an Azure Automation account for storing the MOF files.

If you need DSC in an isolated or non-cloud ready environment, all the required components can be installed as a local lab. For that AutomatedLab (AL) is required that handles the deployment of VMs on Azure or Hyper-V. AL also installs all the required software and does the necessary configurations. Deploying the lab takes 3 to 5 hours, is fully automated and includes:

  • Active Directory Domain
  • SQL Server 2017
  • Azure DevOps Server for hosting the code, running the builds and providing NuGet feed to Software (Chocolatey) and PowerShell modules
  • 4 to 8 Azure DevOps Build Agents
  • DSC Pull Server (SQL Server access already configured)
  • Certificate Authority for SSL support and credential encryption
  • Routing Services so all VMs can access the internet

The lab script are in Lab.

Technical Details

  • Configuration management that allows multiple layers of data (psd1 files and hash tables can’t be the solution)
  • Tooling to fully automated the build and release process
  • Dependency resolution
  • Maintenance windows (which the LCM does not support)
  • Reporting (at least if you are using the on-prem pull server)
  • Git branching model
  • Automated testing

YAML Reference Documentation

The YAML reference documentation is located in the ./doc subfolder of the DscConfig.Demo repository.

dscworkshop's People

Contributors

br4v3st4rr avatar christophhannappel avatar cs-student101 avatar danielniccoli avatar dolearnwhilealive avatar erenes avatar gaelcolas avatar harpsingh avatar kewalaka avatar nyanhp avatar outek avatar raandree avatar stehlih avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dscworkshop's Issues

Nonexisting path?

Problem description

In the Task2 - StretchGoal.md it asks me to clone the https://github.com/raandree/DscConfig.Demo repo, and create the folder structure

source\
        DscResources\
            Disks\
            Disks.psd1
            Disks.schema.psm1

which I did. I also populated these with the contents in the .md file.

After that however it instructs me to do:

Copy-Item -Path .\DscConfig.Demo\output\Module\DscConfig.Demo\ -Destination .\DscWorkshop\output\RequiredModules\ -Recurse

but the \output\ does not exist.

I imagine it would be created during the .\build.ps1 in the dscconfig.demo folder, but when I execute this, I get an error.

Verbose logs

Describing Final tests Number of compiled MOF files: 26 [+] Every composite resource has compiled 81ms (12ms|69ms) Number of composite resource folders: 27 Number of composite resource folders (considering 'skippedDscResources'): 27 Number of all composite resources: 26 Number of composite resources (considering 'skippedDscResources'): 26 InputObject SideIndicator ----------- ------------- Disks <= [-] Composite resource folder count matches composite resource count 211ms (203ms|9ms) Expected 26, but got 27. at $FilteredCompositeResourceFolders.Count | Should -Be $FilteredCompositeResources.Count, C:\tmp\things\DscConfig.Demo\tests\Unit\DSCResources\DscResources.Tests.ps1:135 at Invoke-Assertion, C:\tmp\things\DscWorkshop\output\RequiredModules\Pester\5.3.3\Pester.psm1:8078 at Should, C:\tmp\things\DscWorkshop\output\RequiredModules\Pester\5.3.3\Pester.psm1:8016 at , C:\tmp\things\DscConfig.Demo\tests\Unit\DSCResources\DscResources.Tests.ps1:135 at , C:\tmp\things\DscWorkshop\output\RequiredModules\Pester\5.3.3\Pester.psm1:1988 at , C:\tmp\things\DscWorkshop\output\RequiredModules\Pester\5.3.3\Pester.psm1:1949 at Invoke-ScriptBlock, C:\tmp\things\DscWorkshop\output\RequiredModules\Pester\5.3.3\Pester.psm1:2110 at Invoke-TestItem, C:\tmp\things\DscWorkshop\output\RequiredModules\Pester\5.3.3\Pester.psm1:1184 at Invoke-Block, C:\tmp\things\DscWorkshop\output\RequiredModules\Pester\5.3.3\Pester.psm1:826 at , C:\tmp\things\DscWorkshop\output\RequiredModules\Pester\5.3.3\Pester.psm1:881 at , C:\tmp\things\DscWorkshop\output\RequiredModules\Pester\5.3.3\Pester.psm1:1988 at , C:\tmp\things\DscWorkshop\output\RequiredModules\Pester\5.3.3\Pester.psm1:1949 at Invoke-ScriptBlock, C:\tmp\things\DscWorkshop\output\RequiredModules\Pester\5.3.3\Pester.psm1:2113 at Invoke-Block, C:\tmp\things\DscWorkshop\output\RequiredModules\Pester\5.3.3\Pester.psm1:928 at , C:\tmp\things\DscWorkshop\output\RequiredModules\Pester\5.3.3\Pester.psm1:881 at , C:\tmp\things\DscWorkshop\output\RequiredModules\Pester\5.3.3\Pester.psm1:1988 at , C:\tmp\things\DscWorkshop\output\RequiredModules\Pester\5.3.3\Pester.psm1:1949 at Invoke-ScriptBlock, C:\tmp\things\DscWorkshop\output\RequiredModules\Pester\5.3.3\Pester.psm1:2113 at Invoke-Block, C:\tmp\things\DscWorkshop\output\RequiredModules\Pester\5.3.3\Pester.psm1:928 at , C:\tmp\things\DscWorkshop\output\RequiredModules\Pester\5.3.3\Pester.psm1:1662 at , C:\tmp\things\DscWorkshop\output\RequiredModules\Pester\5.3.3\Pester.ps1:3 at , C:\tmp\things\DscWorkshop\output\RequiredModules\Pester\5.3.3\Pester.psm1:3154 at Invoke-InNewScriptScope, C:\tmp\things\DscWorkshop\output\RequiredModules\Pester\5.3.3\Pester.psm1:3161 at Run-Test, C:\tmp\things\DscWorkshop\output\RequiredModules\Pester\5.3.3\Pester.psm1:1665 at Invoke-Test, C:\tmp\things\DscWorkshop\output\RequiredModules\Pester\5.3.3\Pester.psm1:2465 at Invoke-Pester, C:\tmp\things\DscWorkshop\output\RequiredModules\Pester\5.3.3\Pester.psm1:5225 at , C:\tmp\things\DscWorkshop\output\RequiredModules\Sampler\0.115.0\tasks\Invoke-Pester.pester.build.ps1:906 at *Task, C:\tmp\things\DscWorkshop\output\RequiredModules\InvokeBuild\5.9.10\Invoke-Build.ps1:571 at *Task, C:\tmp\things\DscWorkshop\output\RequiredModules\InvokeBuild\5.9.10\Invoke-Build.ps1:543 at *Task, C:\tmp\things\DscWorkshop\output\RequiredModules\InvokeBuild\5.9.10\Invoke-Build.ps1:543 at *Task, C:\tmp\things\DscWorkshop\output\RequiredModules\InvokeBuild\5.9.10\Invoke-Build.ps1:543 at , C:\tmp\things\DscWorkshop\output\RequiredModules\InvokeBuild\5.9.10\Invoke-Build.ps1:729 at , C:\tmp\things\DscConfig.Demo\Build.ps1:507 at , :1 Tests completed in 324.95s Tests Passed: 53, Failed: 1, Skipped: 0 NotRun: 0 Done /./test/Pester_Tests_Stop_On_Fail/Invoke_Pester_Tests_v5 00:05:33.5891847 Task /./test/Pester_Tests_Stop_On_Fail/Upload_Test_Results_To_AppVeyor skipped.

How to reproduce

create files

PS C:\tmp\things\DscConfig.Demo> get-content C:\tmp\things\DscConfig.Demo\source\DSCResources\Disks\Disks.psd1
@{
    RootModule           = 'Disks.schema.psm1'
    ModuleVersion        = '0.0.1'
    GUID                 = '27238df7-8c89-4acf-8eef-80750b964380'
    Author               = 'NA'
    CompanyName          = 'NA'
    Copyright            = 'NA'
    DscResourcesToExport = @('Disks')
}
PS C:\tmp\things\DscConfig.Demo> get-content C:\tmp\things\DscConfig.Demo\source\DSCResources\Disks\Disks.schema.psm1
configuration Disks
{
    param (
        [Parameter(Mandatory = $true)]
        [hashtable[]]
        $Disks
    )

    Import-DscResource -ModuleName PSDesiredStateConfiguration
    Import-DscResource -ModuleName StorageDsc

    foreach ($disk in $Disks)
    {
        # convert string with KB/MB/GB into Uint64
        if ($null -ne $disk.Size)
        {
            $disk.Size = [Uint64] ($disk.Size / 1)
        }

        # convert string with KB/MB/GB into Uint32
        if ($null -ne $disk.AllocationUnitSize)
        {
            $disk.AllocationUnitSize = [Uint32] ($disk.AllocationUnitSize / 1)
        }

        $executionName = $disk.DiskId
        (Get-DscSplattedResource -ResourceName Disk -ExecutionName $executionName -Properties $disk -NoInvoke).Invoke($disk)
    }
}
PS C:\tmp\things\DscConfig.Demo>

then run .\Build.ps1

Expected behavior

Build to generate a usable composite module

Current behavior

Build does not generate a usable module

Suggested solution

???

Operating system the target node is running

Windows 10

PowerShell version and build the target node is running

PSVersion                      5.1.

Module version used

latest

Seems to be a problem "Splatting" to xWebSite

Hi,

There seems to be a problem when running

(Get-DscSplattedResource -ResourceName xWebSite -ExecutionName $executionName -Properties $item -NoInvoke).Invoke($item)

When you have nested AuthenticationInfo or BindingInfo Present.

Failed to create MOF files

After typing .\Build.ps1 -ResolveDependency no MOF has been created.
I got this type of error for each MOF:

DSCFile01 : DSCFile01 : MOF__0.0.0 NA
DSCFile01 : FileServer ::> FilesAndFolders .....................................................OK
DSCFile01 : FileServer ::> RegistryValues ......................................................OK
DSCFile01 : FileServer ::> SecurityBase ........................................................OK
DSCFile01 : FileServer ::> WindowsFeatures .....................................................OK
DSCFile01 : FileServer ::> NetworkIpConfiguration ..............................................OK
DSCFile01 : FileServer ::> DscLcmController ....................................................OK
DSCFile01 : FileServer ::> DscLcmMaintenanceWindows ............................................OK
DSCFile01 : FileServer ::> DscTagging ..........................................................FAILED
Compilation Error: System.Management.Automation.ParentContainsErrorRecordException: You cannot call a method on a null-valued expression..Message
Error occured during compilation of node 'DSCFile01' : Compilation errors occurred while processing configuration 'RootConfiguration'. Please review the errors reported in error stream and modify your configuration code appropriately.
Compilation errors occurred while processing configuration 'RootConfiguration'. Please review the errors reported in error stream and modify your configuration code appropriately.
At C:\Windows\System32\WindowsPowerShell\v1.0\Modules\PSDesiredStateConfiguration\PSDesiredStateConfiguration.psm1:3917 char:5
+ throw $ErrorRecord
+ ~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (RootConfiguration:String) [], InvalidOperationException
+ FullyQualifiedErrorId : FailToProcessConfiguration
`PSDesiredStateConfiguration\Configuration : You cannot call a method on a null-valued expression.` `At C:\Temp\DscWorkshop-dev\DscWorkshop-dev\DSC\DscConfigurations\CommonTasks\0.2.85\DSCResources\DscTagging\DscTagging.schema.psm1:1 char:1` `+ Configuration DscTagging {` `+ ~~~~~~~~~~~~~~~~~~~~~~~~~~` ` + CategoryInfo : InvalidOperation: (:) [Configuration], ParentContainsErrorRecordException` ` + FullyQualifiedErrorId : InvokeMethodOnNull,Configuration`
Exception calling "InvokeWithContext" with "2" argument(s): "You cannot call a method on a null-valued expression."
At C:\Windows\System32\WindowsPowerShell\v1.0\Modules\PSDesiredStateConfiguration\PSDesiredStateConfiguration.psm1:2232 char:13
+ $result = $Body.InvokeWithContext($functionsToDefine, $va ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : RuntimeException

LcmController.log growth should be configurable

The LcmController.log grows over time and does not have a limit. It should be possible that data older than n days days to be removed from the log. This can be an additional function in the DscLcmController configurations.

The marker in the log file is:

Start

**********************
Windows PowerShell transcript start
Start time: 20201208163655

End

Windows PowerShell transcript end
End time: 20201208163703

The suggested new file name for the log file is containing the year and week number of year: 2020-50-LcmController.log

Get-Date -UFormat %Y-%V-LcmController.log

Question about encrypted credentials

Hi,

Firstly... awesome work!!! Very informative, and VERY useful!!!

I did have a question regarding the credential credentials configuration seen in the various yaml configurations throught the built result.
They seem to be encrypted and I am having trouble understanding how this was done.
Since I won't be working with the lab, and will be attempting to make use of this in conjunction with my project I am looking to encrypt and configure the credentials in a way that merges with my requirements.

Could you help with an explanation, or maybe pointing me to the part of the full workshop that goes into this?

Project License is not specified

Please specify the project license so that we can use the code in our commercial environment without getting trouble with our FOSS inspectors.

AddsOrgUnitsAndGroups conflict, missing Credential Parameter?

Problem description

In the DomainController.yml file, I added the following configuration

image

when I run the build, the log shows a conflict between keys. It looks like AddsOrgUnitsAndGroups is possibly missing a credential parameter?

When removing the configuration above, the builds succeeds and the Node reaches the desired state.

Verbose logs

**********************
PowerShell transcript start
Start time: 20240305164702
Username: SHITTY10\me
RunAs User: SHITTY10\me
Configuration Name: 
Machine: SHITTY10 (Microsoft Windows NT 10.0.19045.0)
Host Application: C:\Program Files\PowerShell\7\pwsh.dll -NoProfile -ExecutionPolicy Bypass -Command Import-Module 'c:\Users\me\.vscode\extensions\ms-vscode.powershell-2024.0.0\modules\PowerShellEditorServices\PowerShellEditorServices.psd1'; Start-EditorServices -HostName 'Visual Studio Code Host' -HostProfileId 'Microsoft.VSCode' -HostVersion '2024.0.0' -AdditionalModules @('PowerShellEditorServices.VSCode') -BundledModulesPath 'c:\Users\me\.vscode\extensions\ms-vscode.powershell-2024.0.0\modules' -EnableConsoleRepl -StartupBanner "PowerShell Extension v2024.0.0
Copyright (c) Microsoft Corporation.

https://aka.ms/vscode-powershell
Type 'help' to get help.
" -LogLevel 'Normal' -LogPath 'c:\Users\me\AppData\Roaming\Code\User\globalStorage\ms-vscode.powershell\logs\1709647651-a8b3a617-40bc-4043-9191-fa294d9c2a181709647649785\EditorServices.log' -SessionDetailsPath 'c:\Users\me\AppData\Roaming\Code\User\globalStorage\ms-vscode.powershell\sessions\PSES-VSCode-7696-768579.json' -FeatureFlags @() 
Process ID: 4312
PSVersion: 7.4.1
PSEdition: Core
GitCommitId: 7.4.1
OS: Microsoft Windows 10.0.19045
Platform: Win32NT
PSCompatibleVersions: 1.0, 2.0, 3.0, 4.0, 5.0, 5.1, 6.0, 7.0
PSRemotingProtocolVersion: 2.3
SerializationVersion: 1.1.0.1
WSManStackVersion: 3.0
**********************
Transcript started, output file is output\Logs\CompileRootConfiguration.log

Did not find 'RootConfiguration.ps1' and 'CompileRootConfiguration.ps1' in 'source', using the ones in 'Sampler.DscPipeline'
RootConfiguration will import these composite resource modules as defined in 'build.yaml':
	- PSDesiredStateConfiguration
	- PSDscResources
	- CommonTasks

Preloading available resources


---------------------------------------------------------------------------
DSCWeb01 : DSCWeb01 : MOF__ NA
    DSCWeb01 : WebServer ::> FilesAndFolders .......................................................OK
    DSCWeb01 : WebServer ::> WindowsServices .......................................................OK
    DSCWeb01 : WebServer ::> RegistryValues ........................................................OK
    DSCWeb01 : WebServer ::> WebApplicationPools ...................................................OK
    DSCWeb01 : WebServer ::> WebApplications .......................................................OK
    DSCWeb01 : WebServer ::> SecurityBase ..........................................................OK
    DSCWeb01 : WebServer ::> WindowsFeatures .......................................................OK
    DSCWeb01 : WebServer ::> ComputerSettings ......................................................OK
    DSCWeb01 : WebServer ::> WindowsEventLogs ......................................................OK
    DSCWeb01 : WebServer ::> DscTagging ............................................................OK

---------------------------------------------------------------------------
FS01 : FS01 : MOF__ NA
    FS01 : FileServer ::> FilesAndFolders ..........................................................OK
    FS01 : FileServer ::> RegistryValues ...........................................................OK
    FS01 : FileServer ::> SecurityBase .............................................................OK
    FS01 : FileServer ::> WindowsFeatures ..........................................................OK
    FS01 : FileServer ::> ComputerSettings .........................................................OK
    FS01 : FileServer ::> WindowsEventLogs .........................................................OK
    FS01 : FileServer ::> DscTagging ...............................................................OK

---------------------------------------------------------------------------
DSCFile01 : DSCFile01 : MOF__ NA
    DSCFile01 : FileServer ::> FilesAndFolders .....................................................OK
    DSCFile01 : FileServer ::> RegistryValues ......................................................OK
    DSCFile01 : FileServer ::> SecurityBase ........................................................OK
    DSCFile01 : FileServer ::> WindowsFeatures .....................................................OK
    DSCFile01 : FileServer ::> ComputerSettings ....................................................OK
    DSCFile01 : FileServer ::> WindowsEventLogs ....................................................OK
    DSCFile01 : FileServer ::> DscTagging ..........................................................OK

---------------------------------------------------------------------------
ReferenceConfigurationDev : ReferenceConfigurationDev : MOF__ NA
    ReferenceConfigurationDev : FileServer ::> FilesAndFolders .....................................OK
    ReferenceConfigurationDev : FileServer ::> RegistryValues ......................................OK
    ReferenceConfigurationDev : FileServer ::> SecurityBase ........................................OK
    ReferenceConfigurationDev : FileServer ::> WindowsFeatures .....................................OK
    ReferenceConfigurationDev : FileServer ::> ComputerSettings ....................................OK
    ReferenceConfigurationDev : FileServer ::> WindowsEventLogs ....................................OK
    ReferenceConfigurationDev : FileServer ::> DscTagging ..........................................OK

---------------------------------------------------------------------------
DSCFile03 : DSCFile03 : MOF__ NA
    DSCFile03 : FileServer ::> FilesAndFolders .....................................................OK
    DSCFile03 : FileServer ::> RegistryValues ......................................................OK
    DSCFile03 : FileServer ::> SecurityBase ........................................................OK
    DSCFile03 : FileServer ::> WindowsFeatures .....................................................OK
    DSCFile03 : FileServer ::> ComputerSettings ....................................................OK
    DSCFile03 : FileServer ::> WindowsEventLogs ....................................................OK
    DSCFile03 : FileServer ::> DscTagging ..........................................................OK

---------------------------------------------------------------------------
ReferenceConfigurationProd : ReferenceConfigurationProd : MOF__ NA
    ReferenceConfigurationProd : FileServer ::> FilesAndFolders ....................................OK
    ReferenceConfigurationProd : FileServer ::> RegistryValues .....................................OK
    ReferenceConfigurationProd : FileServer ::> SecurityBase .......................................OK
    ReferenceConfigurationProd : FileServer ::> WindowsFeatures ....................................OK
    ReferenceConfigurationProd : FileServer ::> ComputerSettings ...................................OK
    ReferenceConfigurationProd : FileServer ::> WindowsEventLogs ...................................OK
    ReferenceConfigurationProd : FileServer ::> DscTagging .........................................OK

---------------------------------------------------------------------------
DSCWeb03 : DSCWeb03 : MOF__ NA
    DSCWeb03 : WebServer ::> FilesAndFolders .......................................................OK
    DSCWeb03 : WebServer ::> WindowsServices .......................................................OK
    DSCWeb03 : WebServer ::> RegistryValues ........................................................OK
    DSCWeb03 : WebServer ::> WebApplicationPools ...................................................OK
    DSCWeb03 : WebServer ::> WebApplications .......................................................OK
    DSCWeb03 : WebServer ::> SecurityBase ..........................................................OK
    DSCWeb03 : WebServer ::> WindowsFeatures .......................................................OK
    DSCWeb03 : WebServer ::> ComputerSettings ......................................................OK
    DSCWeb03 : WebServer ::> WindowsEventLogs ......................................................OK
    DSCWeb03 : WebServer ::> DscTagging ............................................................OK

---------------------------------------------------------------------------
DC01 : DC01 : MOF__ NA
    DC01 : DomainController ::> FilesAndFolders ....................................................OK
    DC01 : DomainController ::> WindowsFeatures ....................................................OK
    DC01 : DomainController ::> AddsDomain .........................................................OK
    DC01 : DomainController ::> AddsDomainController ...............................................OK
Write-Error: 
Line |
 289 |          Test-ConflictingResources $keywordName $canonicalizedValue $k …
     |          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | A conflict was detected between resources '[WaitForADDomain]WaitForestAvailability::[AddsDomainController]AddsDomainController (C:\DscWorkshop\output\RequiredModules\CommonTasks\0.10.0\DscResources\AddsDomainController\AddsDomainController.schema.psm1::74::5::WaitForADDomain)' and '[WaitForADDomain]Domain::[AddsOrgUnitsAndGroups]AddsOrgUnitsAndGroups (C:\DscWorkshop\output\RequiredModules\CommonTasks\0.10.0\DscResources\AddsOrgUnitsAndGroups\AddsOrgUnitsAndGroups.schema.psm1::25::5::WaitForADDomain)' in node 'DC01'. Resources have identical key properties but there are differences in the following non-key properties: 'Credential'. Values 'System.Management.Automation.PSCredential' don't match values 'NULL'. Please update these property values so that they are identical in both cases.
PS>TerminatingError(Get-DscSplattedResource): "Exception calling "Create" with "1" argument(s): "At line:3 char:8
+ ADGroup {
+        ~
A required name or expression was missing.

At line:3 char:9
+ ADGroup {
+         ~
Unexpected token '{' in expression or statement.

At line:5 char:1
+ }
+ ~
Unexpected token '}' in expression or statement.""
Configuration: A required name or expression was missing.
    DC01 : DomainController ::> AddsOrgUnitsAndGroups ..............................................FAILED

    DC01 : DomainController ::> SecurityBase .......................................................OK
    DC01 : DomainController ::> ComputerSettings ...................................................OK
    DC01 : DomainController ::> WindowsEventLogs ...................................................OK
    DC01 : DomainController ::> DscTagging .........................................................OK
PS>TerminatingError(): "Errors occurred while processing configuration 'RootConfiguration'."
PS>TerminatingError(): "Errors occurred while processing configuration 'RootConfiguration'."
>> TerminatingError(): "Errors occurred while processing configuration 'RootConfiguration'."
Error occured during compilation of node '' : Errors occurred while processing configuration 'RootConfiguration'.
PS>TerminatingError(CompileRootConfiguration.ps1): "The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: Errors occurred while processing configuration 'RootConfiguration'."
>> TerminatingError(CompileRootConfiguration.ps1): "The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: Errors occurred while processing configuration 'RootConfiguration'."
Error(s) occured during the compilation. Details will be shown below
PS>TerminatingError(): "The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: Errors occurred while processing configuration 'RootConfiguration'."
**********************
PowerShell transcript end
End time: 20240305164740
**********************

DSC configuration

Configurations:
- WindowsFeatures
- AddsDomain
- AddsDomainController
- AddsOrgUnitsAndGroups


WindowsFeatures:
  Names:
  - +DHCP         # installs WindowsFeature DHCP Server
  Features:
    - Name: RSAT-ADDS-Tools
      IncludeAllSubFeature: true


AddsDomain:
  DomainFqdn: '[x={ $Datum.Global.Domain.DomainFqdn }=]'
  DomainName: '[x={ $Datum.Global.Domain.DomainFqdn.Split(".")[0] }=]'
  DomainAdministrator: '[x={ $Datum.Global.Domain.DomainJoinCredentials }=]'
  SafeModeAdministratorPassword: '[x={ $Datum.Global.Domain.DomainJoinCredentials }=]'
  DatabasePath: C:\Windows\NTDS
  LogPath: C:\Windows\Logs
  SysvolPath: C:\Windows\SYSVOL
  ForceRebootBefore: false
  DependsOn:
  - '[WindowsFeatures]WindowsFeatures'

AddsDomainController:
  DomainName: '[x={ $Datum.Global.Domain.DomainFqdn }=]'
  Credential: '[x={ $Datum.Global.Domain.DomainJoinCredentials }=]'
  SafeModeAdministratorPassword: '[x={ $Datum.Global.Domain.DomainJoinCredentials }=]'
  DatabasePath: C:\Windows\NTDS
  LogPath: C:\Windows\Logs
  SysvolPath: C:\Windows\SYSVOL
  SiteName: Default-First-Site-Name
  IsGlobalCatalog: True
  DependsOn:
  - '[AddsDomain]AddsDomain'

AddsOrgUnitsAndGroups:
  DomainDN: '[x={ $Datum.Global.Domain.DomainDn }=]'
  OrgUnits:
    - Name: '[x={ $Datum.Global.Domain.DomainFqdn.Split(".")[0] }=]'
      Path: '[x={ $Datum.Global.Domain.DomainDn }=]'
      ChildOu:
        - Name: Admins
        - Name: Users
        - Name: Computers
          ChildOu:
          - Name: Servers
          - Name: Workstations
  DependsOn:
  - '[AddsDomain]AddsDomain'
  - '[AddsDomainController]AddsDomainController'


DscTagging:
  Layers:
    - '[x={ Get-DatumSourceFile -Path $File } =]'

Suggested solution

add credential to `AddsDomainController'? I'm not really sure how to resolve this issue.

Operating system the target node is running

WindowsBuildLabEx                                       : 20348.1.amd64fre.fe_release.210507-1500
WindowsCurrentVersion                                   : 6.3
WindowsEditionId                                        : ServerStandardEval
WindowsInstallationType                                 : Server
WindowsInstallDateFromRegistry                          : 3/5/2024 3:23:15 PM
WindowsProductId                                        : 00454-40000-00001-AA561
WindowsProductName                                      : Windows Server 2022 Standard Evaluation
WindowsRegisteredOrganization                           :
WindowsRegisteredOwner                                  : Windows User
WindowsSystemRoot                                       : C:\Windows
WindowsVersion                                          : 2009
OSDisplayVersion                                        : 21H2
BiosCharacteristics                                     : {7, 19, 42}
BiosBIOSVersion                                         : {Xen - 0, Revision: 1.221 }
BiosBuildNumber                                         :
BiosCaption                                             : Revision: 1.221
BiosCodeSet                                             :
BiosCurrentLanguage                                     :
BiosDescription                                         : Revision: 1.221
BiosEmbeddedControllerMajorVersion                      : 255
BiosEmbeddedControllerMinorVersion                      : 255
BiosFirmwareType                                        : Bios
BiosIdentificationCode                                  :
BiosInstallableLanguages                                :
BiosInstallDate                                         :
BiosLanguageEdition                                     :
BiosListOfLanguages                                     :
BiosManufacturer                                        : Xen
BiosName                                                : Revision: 1.221
BiosOtherTargetOS                                       :
BiosPrimaryBIOS                                         : True
BiosReleaseDate                                         : 1/30/2024 6:00:00 PM
BiosSeralNumber                                         : a5243322-5118-6e3a-7ebb-40e6e0037262
BiosSMBIOSBIOSVersion                                   : 4.13
BiosSMBIOSMajorVersion                                  : 2
BiosSMBIOSMinorVersion                                  : 4
BiosSMBIOSPresent                                       : True
BiosSoftwareElementState                                : Running
BiosStatus                                              : OK
BiosSystemBiosMajorVersion                              : 4
BiosSystemBiosMinorVersion                              : 13
BiosTargetOperatingSystem                               : 0
BiosVersion                                             : Xen - 0
CsAdminPasswordStatus                                   : Unknown
CsAutomaticManagedPagefile                              : True
CsAutomaticResetBootOption                              : True
CsAutomaticResetCapability                              : True
CsBootOptionOnLimit                                     :
CsBootOptionOnWatchDog                                  :
CsBootROMSupported                                      : True
CsBootStatus                                            : {0, 0, 0, 127...}
CsBootupState                                           : Normal boot
CsCaption                                               : DC01
CsChassisBootupState                                    : Safe
CsChassisSKUNumber                                      :
CsCurrentTimeZone                                       : -360
CsDaylightInEffect                                      : False
CsDescription                                           : AT/AT COMPATIBLE
CsDNSHostName                                           : DC01
CsDomain                                                : lab.local
CsDomainRole                                            : PrimaryDomainController
CsEnableDaylightSavingsTime                             : True
CsFrontPanelResetStatus                                 : Unknown
CsHypervisorPresent                                     : True
CsInfraredSupported                                     : False
CsInitialLoadInfo                                       :
CsInstallDate                                           :
CsKeyboardPasswordStatus                                : Unknown
CsLastLoadInfo                                          :
CsManufacturer                                          : Xen
CsModel                                                 : HVM domU
CsName                                                  : DC01
CsNetworkAdapters                                       : {Ethernet 2}
CsNetworkServerModeEnabled                              : True
CsNumberOfLogicalProcessors                             : 2
CsNumberOfProcessors                                    : 1
CsProcessors                                            : {Intel(R) Core(TM) i5-4570 CPU @ 3.20GHz}
CsOEMStringArray                                        : {Xen,
                                                          MS_VM_CERT/SHA1/bdbeb6e0a816d43fa6d3fe8aaef04c2bad9d3e3d}
CsPartOfDomain                                          : True
CsPauseAfterReset                                       : -1
CsPCSystemType                                          : Desktop
CsPCSystemTypeEx                                        : Desktop
CsPowerManagementCapabilities                           :
CsPowerManagementSupported                              :
CsPowerOnPasswordStatus                                 : Unknown
CsPowerState                                            : Unknown
CsPowerSupplyState                                      : Safe
CsPrimaryOwnerContact                                   :
CsPrimaryOwnerName                                      : Windows User
CsResetCapability                                       : Other
CsResetCount                                            : -1
CsResetLimit                                            : -1
CsRoles                                                 : {LM_Workstation, LM_Server, Primary_Domain_Controller,
                                                          Timesource...}
CsStatus                                                : OK
CsSupportContactDescription                             :
CsSystemFamily                                          :
CsSystemSKUNumber                                       :
CsSystemType                                            : x64-based PC
CsThermalState                                          : Safe
CsTotalPhysicalMemory                                   : 4286169088
CsPhyicallyInstalledMemory                              : 4186112
CsUserName                                              :
CsWakeUpType                                            : PowerSwitch
CsWorkgroup                                             :
OsName                                                  : Microsoft Windows Server 2022 Standard Evaluation
OsType                                                  : WINNT
OsOperatingSystemSKU                                    : 79
OsVersion                                               : 10.0.20348
OsCSDVersion                                            :
OsBuildNumber                                           : 20348
OsHotFixes                                              : {KB5034613, KB5034770, KB5034869, KB5010523}
OsBootDevice                                            : \Device\HarddiskVolume1
OsSystemDevice                                          : \Device\HarddiskVolume2
OsSystemDirectory                                       : C:\Windows\system32
OsSystemDrive                                           : C:
OsWindowsDirectory                                      : C:\Windows
OsCountryCode                                           : 1
OsCurrentTimeZone                                       : -360
OsLocaleID                                              : 0409
OsLocale                                                : en-US
OsLocalDateTime                                         : 3/5/2024 5:07:00 PM
OsLastBootUpTime                                        : 3/5/2024 2:07:55 PM
OsUptime                                                : 02:59:05.1999531
OsBuildType                                             : Multiprocessor Free
OsCodeSet                                               : 1252
OsDataExecutionPreventionAvailable                      : True
OsDataExecutionPrevention32BitApplications              : True
OsDataExecutionPreventionDrivers                        : True
OsDataExecutionPreventionSupportPolicy                  : OptOut
OsDebug                                                 : False
OsDistributed                                           : False
OsEncryptionLevel                                       : 256
OsForegroundApplicationBoost                            : Maximum
OsTotalVisibleMemorySize                                : 4185712
OsFreePhysicalMemory                                    : 2523212
OsTotalVirtualMemorySize                                : 5627504
OsFreeVirtualMemory                                     : 3827728
OsInUseVirtualMemory                                    : 1799776
OsTotalSwapSpaceSize                                    :
OsSizeStoredInPagingFiles                               : 1441792
OsFreeSpaceInPagingFiles                                : 1264060
OsPagingFiles                                           : {C:\pagefile.sys}
OsHardwareAbstractionLayer                              : 10.0.20348.2031
OsInstallDate                                           : 3/5/2024 9:23:15 AM
OsManufacturer                                          : Microsoft Corporation
OsMaxNumberOfProcesses                                  : 4294967295
OsMaxProcessMemorySize                                  : 137438953344
OsMuiLanguages                                          : {en-US}
OsNumberOfLicensedUsers                                 : 0
OsNumberOfProcesses                                     : 109
OsNumberOfUsers                                         : 12
OsOrganization                                          :
OsArchitecture                                          : 64-bit
OsLanguage                                              : en-US
OsProductSuites                                         : {TerminalServices, TerminalServicesSingleSession}
OsOtherTypeDescription                                  :
OsPAEEnabled                                            :
OsPortableOperatingSystem                               : False
OsPrimary                                               : True
OsProductType                                           : DomainController
OsRegisteredUser                                        : Windows User
OsSerialNumber                                          : 00454-40000-00001-AA561
OsServicePackMajorVersion                               : 0
OsServicePackMinorVersion                               : 0
OsStatus                                                : OK
OsSuites                                                : {TerminalServices, TerminalServicesSingleSession}
OsServerLevel                                           : FullServer
KeyboardLayout                                          : en-US
TimeZone                                                : (UTC-06:00) Central Time (US & Canada)
LogonServer                                             : \\DC01
PowerPlatformRole                                       : Desktop
HyperVisorPresent                                       : True
HyperVRequirementDataExecutionPreventionAvailable       :
HyperVRequirementSecondLevelAddressTranslation          :
HyperVRequirementVirtualizationFirmwareEnabled          :
HyperVRequirementVMMonitorModeExtensions                :
DeviceGuardSmartStatus                                  : Off
DeviceGuardRequiredSecurityProperties                   :
DeviceGuardAvailableSecurityProperties                  :
DeviceGuardSecurityServicesConfigured                   :
DeviceGuardSecurityServicesRunning                      :
DeviceGuardCodeIntegrityPolicyEnforcementStatus         :
DeviceGuardUserModeCodeIntegrityPolicyEnforcementStatus :

PowerShell version and build the target node is running

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

CommonTasks2 version

Name        Version Path
----        ------- ----
CommonTasks 0.10.0  C:\DscWorkshop\output\RequiredModules\CommonTasks\0.10.0\CommonTasks.psd1

Transcript and logs should be closed in case of a build error

Error is:

ERROR: Cannot remove item C:\Git\DscWorkshop\DSC\BuildOutput\Logs\TestDscResources.log: The process cannot access the file 'TestDscResources.log' because it is being used by another process.
At C:\Git\DscWorkshop\DSC\Build\Tasks\CleanBuildOutput.ps1:22 char:61
+ ... tem -Path $BuildOutput -Exclude Modules | Remove-Item -Force -Recurse

Right now, 'Stop-Transcript' needs to be called before being able to trigger a new build

Unable to create the DSCCASQL01 Server - 03 Full Lab with DSC and TFS Azure.ps1

having som issues running the '03 Full Lab with DSC and TFS Azure.ps1'. I get the following error msg:

Failed to create the following Azure machines: DSCCASQL01'. For further information take a look at the background job's result (Get-Job, Receive-Job)
At C:\Program Files\WindowsPowerShell\Modules\AutomatedLab\5.0.2.0\AutomatedLabVirtualMachines.psm1:99 char:9

  •     throw "Failed to create the following Azure machines: $machin ...
    
  •     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : OperationStopped: (Failed to creat...b, Receive-Job):String) [], RuntimeException
    • FullyQualifiedErrorId : Failed to create the following Azure machines: DSCCASQL01'. For further information take a look at the background job's result (Get-Job, Receive-Job)

when i do a Get-Job | Receive-Job i get the following:

One or more errors occured during VM creation.
System.Management.Automation.ActionPreferenceStopException: The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: The platform
image 'MicrosoftSQLServer:SQL2017-WS2016-BYOL:Enterprise:latest' is not available. Verify that all fields in the storage profile are correct.
ErrorCode: ImageNotFound
ErrorMessage: The platform image 'MicrosoftSQLServer:SQL2017-WS2016-BYOL:Enterprise:latest' is not available. Verify that all fields in the storage profile are correct.
StatusCode: 404
ReasonPhrase: Not Found
OperationID : faba9988-5d46-44cf-8414-261371159398
ved System.Management.Automation.ExceptionHandlingOps.CheckActionPreference(FunctionContext funcContext, Exception exception)
ved System.Management.Automation.Interpreter.ActionCallInstruction2.Run(InterpretedFrame frame) ved System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame) ved System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame) + CategoryInfo : OperationStopped: (One or more err...tedFrame frame):String) [], RuntimeException + FullyQualifiedErrorId : One or more errors occured during VM creation. System.Management.Automation.ActionPreferenceStopException: The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: The pla tform image 'MicrosoftSQLServer:SQL2017-WS2016-BYOL:Enterprise:latest' is not available. Verify that all fields in the storage profile are correct. ErrorCode: ImageNotFound ErrorMessage: The platform image 'MicrosoftSQLServer:SQL2017-WS2016-BYOL:Enterprise:latest' is not available. Verify that all fields in the storage profile are correct. StatusCode: 404 ReasonPhrase: Not Found OperationID : faba9988-5d46-44cf-8414-261371159398 ved System.Management.Automation.ExceptionHandlingOps.CheckActionPreference(FunctionContext funcContext, Exception exception) ved System.Management.Automation.Interpreter.ActionCallInstruction2.Run(InterpretedFrame frame)
ved System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
ved System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
+ PSComputerName : localhost

VersionControl.ps1 "corrupts" version number

File https://github.com/dsccommunity/DscWorkshop/blob/dev/DSC/Build/Tasks/VersionControl.ps1 causes a "corruption" in the version number. It replaces the PATCH version with the release version. This leads to a version number on the server, that is different than the version number in the configuration repository e.g., Repository: 1.1.3, Server 1.1.1.

According to the Semantic Versioning standard - which I assume is used here - the build number should be added as follows: MAJOR.MINOR.PATCH+BUILD.

How to apply multiple roles to a node?

Hello there,

it is possible to apply multiple roles to one node?
Like:

NodeName: '[x={ $Node.Name }=]'
Environment: '[x={ $File.Directory.BaseName } =]'
Role: 
 - WebServer
 - FileServer

If i try so, the "Describing Node Definition Files" test fails with
[-] Role of 'DSCWeb02' is 'WebServer FileServer' and does exist 28ms (26ms|2ms)
at $node.Role -in $Roles | Should -BeTrue, H:\Code\DscWorkshop\tests\ConfigData\ConfigData.Tests.ps1:176

Master and dev builds fail.

Build.ps1 -ResolveDependency consistently fails for the master and dev branches.

First error

ERROR OCCURED DURING COMPILATION: At D:\temp\dscworkshop\DscSample\RootConfiguration.ps1:14 char:5
+     Import-DscResource -ModuleName PSDesiredStateConfiguration
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Could not find the module 'PSDesiredStateConfiguration'.
At D:\temp\dscworkshop\DscSample\RootConfiguration.ps1:14 char:5
+     Import-DscResource -ModuleName PSDesiredStateConfiguration
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Could not find the module 'PSDesiredStateConfiguration'.
    + CategoryInfo          : ParserError: (:) [], ParseException
    + FullyQualifiedErrorId : ModuleNotFoundDuringParse

Second error

ERROR: The specified module 'Microsoft.PowerShell.Management' was not loaded because no valid module file was found in any module directory.
At line:2 char:25
+ ...             Import-Module Microsoft.PowerShell.Management -Verbose:$f

There have been no changes, the errors occur with a freshly cloned repository immediately.

I can confirm that this happens because PSModulePath is destroyed instead of simply being prepended with our build paths. Removing the line $env:PSModulePath = Join-Path -Path $PShome -ChildPath Modules fixes the issue.

We do not need to destroy the path if we simply prepend our additional paths. As soon as a valid module is picked up, everything is fine.

GitVersion vsix upload results in OverflowException

The lab deployment runs into an error when uploading the GitVersion extension:

08:39:47|00:00:00|00:00:00.004| Executing lab command activity: 'Uploading 'GitVersion' extension' on machines 'DSCDO01'
08:39:47|00:00:00|00:00:00.063| - Waiting for completion
{"$id":"1","innerException":null,"message":"Arithmetic operation resulted in an
overflow.","typeName":"System.OverflowException, mscorlib","typeKey":"OverflowException","errorCode":0,"eventId":0}
    + CategoryInfo          : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebExc
   eption
    + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand
    + PSComputerName        : DSCDO01
08:39:55|00:00:07|00:00:07.563| - Activity done

The same error occurs using the binary file that has been statically included in the source code for this project when using the browser to upload:
Screenshot 2022-01-06 085235

I was unable to find a download link for the vsix package, but I assume that downloading it rather than using whatever git has done to the file would solve this issue. So far, the workshop is unusable at the moment without manual intervention.

Mof Compare Script

Script checks if newly built mof files have differences to the mof files on the pull server. Necessary exeptions are in line 17 counting from the bottom.

param(
    [Parameter(Mandatory=$false)]
    [String]$PullServer = ''
)

Write-Output "Testserver? $($UseTestServer)"

$teamName = $env:TEAM
Write-Output "Detected team name: $($teamName)" 


$buildMofsPath = (Join-Path -Path $env:ci_project_dir -ChildPath "$($teamName)\BuildOutput\MOF")
$oldMofsPath = "\\$($PullServer)\DscService\Configuration"

$buildMofs = Get-ChildItem -Path $buildMofsPath -Filter '*.mof' -File

foreach($mof in $buildMofs)
{
    $oldMof = Get-ChildItem -Path $oldMofsPath -Filter "$($mof.BaseName).mof" -File
    if($oldMof.Count -eq 0)
    {
        throw "Could not find mof file for $($mof.BaseName) in $($oldMofsPath)!"
    }
    elseif($oldMof.Count -ge 2)
    {
        throw "Found 2 or more mof file for $($mof.BaseName) in $($oldMofsPath)!"
    }
    
    $mofContent = Get-Content -Path $mof.FullName
    $index = $mofContent.IndexOf("instance of OMI_ConfigurationDocument")
    $lastLines = $mofContent.Length - $index
    $mofContent = $mofContent | Select-Object -Skip 6 | Select-Object -SkipLast $lastLines #Skip first and last lines as they contain the build date but no config data

    $oldMofContent = Get-Content -Path $oldMof.FullName
    $oldIndex = $oldMofContent.IndexOf("instance of OMI_ConfigurationDocument")
    $oldLastLines = $oldMofContent.Length - $oldIndex
    $oldMofContent = $oldMofContent | Select-Object -Skip 6 | Select-Object -SkipLast $oldLastLines
    
    $res = Compare-Object -ReferenceObject $mofContent -DifferenceObject $oldMofContent

    [string[]]$out = @()
    #Filter out some config data that changes after every build although yml files are the same
    foreach($r in $res.InputObject)
    { #Matches: Password, BuildDate&Time, Path to Dsc Modules (incl. runner path), StartTime of scheduled Task (varies based on build time), version, buildnumber, git commit id
        if(($r -match '^Password = ') -or ($r -match '^\s{4}\"\d{2}.\d{2}.\d{4}\s\d{2}:\d{2}:\d{2}\"$') -or ($r -match '^ SourceInfo = ') -or ($r -match '^ StartTime = \"\d{14}.\d{6}\+\d{3}\";$') -or ($r -match '^\s{4}\"\d{1,2}.\d{1,2}.\d{1,4}\"$') -or ($r -match '^\s{4}\"\d{1,4}\"$') -or ($r -match '^\s{4}\"\w{40}\"$'))
        {        
        }else
        {
            $out += $r
        }  
    }
    if($out.Count -ne 0)
    {
        Write-Output "Differences in MOF files $($mof.BaseName) found (see below)! Deploy will be triggered..."
        $out | foreach-object {
            Write-Output $_
        }
        $SKIPDEPLOY = $false #Deploy will be triggered
    }# If no mof has differences, do nothing as default value for SKIPDEPLOY is "True"
}
if($SKIPDEPLOY -ne $false)
{
    $SKIPDEPLOY = $true
    Write-Output "No differences in MOF files found. Skipping deploy..."
}
#$SKIPDEPLOY | Out-File -FilePath envVars.env
Add-Content -Path envVars.env -Value "SKIPDEPLOY=$($SKIPDEPLOY)"`

How to configure a simple push scenario?

Hello and first off I very much admire all the work that has been put into this project!!

I would love to be able to use it to manage multiple "environments" that have different configuration needs. The unique part of my situation is that these are all online virtual learning labs. Each environment is small, containing between 4-12 VMs running on a VMWare host. Some have domain, others do not.

My first scenario that I am testing in contains just two VMs, and I was thinking that since my environments are so small it would make sense to push the configurations, instead of setting up a pull server. I have no need for reporting, and the overhead (cost and resource) would make it impractical, I think. I have seen Microsoft documentation that describes setting up a simple SMB pull server, and that might be feasible in my situation as well.

Can you point me in the direction of any documentation that would describe how to set this up in my situation? I notice that the description of the project says that it generates all DSC artifacts for push or pull scenarios. I have successfully run build.ps1 and have the MOF and MetaMOF in my output folder, but am not sure how to apply it with a "push".

I can see that by default it sets up the LCM for a pull scenario with web and report servers and registration keys. What is the easiest way to remove that configuration, and allow for a scenario where I would take care of getting the required modules to the client, and then starting the DSC Configuration from the machine I'm using to build?

Maybe I shouldn't be using this Blueprint, since it is for medium and complex scope, if so, is there another project that allows for usage of the composite resources? I like the idea of being able to have the baseline config taken care of, and then mostly focusing on the unique configurations in my environment.

Add a Yaml validation in the Build script

When you make an error in a Yaml file, the MOF compilation process fails without a nice error message. Would be great to add a Yaml validation step in the pre-Build steps.

Replace TFS with Azure DevOps Server

I am working on the changes to switch from TFS to Azure DevOps. I am also siwtching the build pipelines to yaml and adding some other improvements. @nyanhp, do you think it is worth adding the improvements also to the TFS version or shall we call TFS as deprecated for this project?

Question about RebootNodeIfNeeded

Hi all,

First of all, I'd like to thank you for sharing this amazing platform.

Also,

I've been trying to get the RebootNodeIfNeeded parameter to work, but I'm not sure exactly where to place it.

I've tried under the node itself by the allowplaintextpassword parameter , under the LcmConfig, and under the Role. However, the lcm stops the config on pending reboot and the node never restarts. Any help would be appreciated.

image

Edit: Please close this issue. I found the setting I was looking for under DscLcm.yml

Question about merging hashtables

Hi

I have some troubles to merge hashtables from the baseline with hashtables from a role.
Let me explain my intention based on the DscWorkshop Files.

I would like to createa file on every Server. Now i have a specific role which i would like create another file.

SOmething like here: https://github.com/AutomatedLab/DscWorkshop/blob/dev/DscSample/DSC_ConfigData/Roles/FileServer/FilesAndFolders/Items.yml#L2

In the Baseline:

- DestinationPath: C:\Test1.txt
  Type: File
  Contents: A file on every Server created with Dsc

In the Role:

- DestinationPath: C:\Createthisfile.txt
  Type: File
  Contents: A file on a specific role created with Dsc

That's my Datum.yml configuration, but it don't merge the values.
The Default is: default_lookup_options: MostSpecific

FilesAndFolders: hash

FilesAndFolders\Items:
  merge_hash_array: DeepTuple
  merge_options:
    tuple_keys:
      - Destination
      - Type
      - Contents

Maybe you @gaelcolas can help me a little bit?
Thank you

LCM may hang when applying huge configurations

LCM may hang when applying huge configurations up to several days. The DscLcmController can be used to control / reset the LCM when starting it in the background.

$timeout = 5
$j = Start-Job -ScriptBlock { Start-Sleep -Seconds 66 }
while ($j.State -eq 'Running' -and $timeout -gt 0) {
    Start-Sleep -Seconds 1
    $timeout--
    Write-Host "$timeout"
}

if ($j.State -eq 'Running') {
    $j | Stop-Job
    #find the process that is hosting the DSC engine
    $dscProcess = Get-WmiObject msft_providers | Where-Object { $_.Provider -like 'dsccore' -or $_.Provider -eq 'dsctimer'}
    Write-Host "Shutting down LCM process with ID '$($dscProcess.HostProcessIdentifier)'"
    Get-Process -Id $dscProcess.HostProcessIdentifier | Stop-Process -Force
}

The maximum runtime of the LCM should be configurable in the section DscBaseline::LcmController section. The name of the additional property could be MaxLcmRuntime.

Error when trying to build a DC

Hi Again.

So I tried to add a DomainController (still testing this in a lab), hoping that - since the role is already there - it is going to be a smooth sailing. But I got a bit of an issue:

I added the file source\AllNodes\Prod\DSCDC01.yml :

NodeName: '[x={ $Node.Name }=]'
Environment: '[x={ $File.Directory.BaseName } =]'
Role: DomainController
Description: '[x= "$($Node.Role) in $($Node.Environment)" =]'
Location: Frankfurt
Baseline: Server

ComputerSettings:
  Name: '[x={ $Node.NodeName }=]'
  Description: '[x= "$($Node.Role) in $($Node.Environment)" =]'

NetworkIpConfiguration:
  Interfaces:
    - InterfaceAlias: DscWorkshop 0
      IpAddress: 192.168.111.10
      Prefix: 24
      Gateway: 192.168.111.1
      DnsServer:
        - 192.168.111.10
      DisableNetbios: false

PSDscAllowPlainTextPassword: True
PSDscAllowDomainUser: True

LcmConfig:
  ConfigurationRepositoryWeb:
    Server:
      ConfigurationNames: '[x={ $Node.NodeName }=]'

DscTagging:
  Layers:
    - '[x={ Get-DatumSourceFile -Path $File } =]'

I understood I only need to change the

  • role
  • name of the node
  • IP address

Right?

Build script errors out as:

DSCDC01 : DSCDC01 : MOF__ NA
    DSCDC01 : DomainController ::> FilesAndFolders .................................................OK
PSDesiredStateConfiguration\node : The term 'AddsDomainController' is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:19 char:5
+     node $ConfigurationData.AllNodes.NodeName {
+     ~~~~
    + CategoryInfo          : ObjectNotFound: (AddsDomainController:String) [PSDesiredStateConfiguration\node], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : CommandNotFoundException,PSDesiredStateConfiguration\node

Error occured during compilation of node '' : Compilation errors occurred while processing configuration 'RootConfiguration'. Please review the errors reported in error stream and modify your configuration code appropriately.
Compilation errors occurred while processing configuration 'RootConfiguration'. Please review the errors reported in error stream and modify your
configuration code appropriately.
At C:\windows\system32\windowspowershell\v1.0\Modules\PSDesiredStateConfiguration\PSDesiredStateConfiguration.psm1:3917 char:5
+     throw $ErrorRecord
+     ~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (RootConfiguration:String) [], InvalidOperationException
    + FullyQualifiedErrorId : FailToProcessConfiguration

PSDesiredStateConfiguration\node : The term 'AddsDomainController' is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:19 char:5
+     node $ConfigurationData.AllNodes.NodeName {
+     ~~~~
    + CategoryInfo          : ObjectNotFound: (AddsDomainController:String) [PSDesiredStateConfiguration\node], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : CommandNotFoundException,PSDesiredStateConfiguration\node

Exception calling "Invoke" with "1" argument(s): "The term 'AddsDomainController' is not recognized as the name of a cmdlet, function, script file, or
operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again."
At line:32 char:13
+             (Get-DscSplattedResource -ResourceName $configurationName ...
+             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The config is of course there in the file source\Roles\DomainController.yml so not sure why it does not find it?
Am I missing something?

Thanks,
F.

Datum 0.0.36 breaks the build

When upgrading to Datum 0.0.36 we get the following errors. It seems that the location of 'Get-DscSplattedResource' makes a difference. @gaelcolas, can you give us a pointer where to troubleshoot?

The error scenarios are these: When building in a new PowerShell session, the compilation of the first Node fails, the rest works fine. When starting the build again, all MOF files can be compiles but none of the meta MOFs.

The errors for scenario 1:

---------------------------------------------------------------------------
DSCFile01 : DSCFile01 : MOF__0.0.0 NA
PSDesiredStateConfiguration\node : At 
C:\Git\DscWorkshop\DscSample\DSC_Resources\xPSDesiredStateConfiguration\8.4.0.0\DSCPullServerSetup\PublishModulesAndMofsToPullServer.psm1:41 char:16
+     Log -Scope $MyInvocation -Message 'Start Deployment'
+                ~~~~~~~~~~~~~
Unexpected token '$MyInvocation' in expression or statement.
At C:\Git\DscWorkshop\DscSample\DSC_Resources\xPSDesiredStateConfiguration\8.4.0.0\DSCPullServerSetup\PublishModulesAndMofsToPullServer.psm1:41 char:30
+     Log -Scope $MyInvocation -Message 'Start Deployment'
+                              ~~~~~~~~
Unexpected token '-Message' in expression or statement.
At C:\Git\DscWorkshop\DscSample\DSC_Resources\xPSDesiredStateConfiguration\8.4.0.0\DSCPullServerSetup\PublishModulesAndMofsToPullServer.psm1:41 char:39
+     Log -Scope $MyInvocation -Message 'Start Deployment'
+                                       ~~~~~~~~~~~~~~~~~~
Unexpected token ''Start Deployment'' in expression or statement.
At C:\Git\DscWorkshop\DscSample\DSC_Resources\xPSDesiredStateConfiguration\8.4.0.0\DSCPullServerSetup\PublishModulesAndMofsToPullServer.psm1:51 char:16
+     Log -Scope $MyInvocation -Message 'End Deployment'
+                ~~~~~~~~~~~~~
Unexpected token '$MyInvocation' in expression or statement.
At C:\Git\DscWorkshop\DscSample\DSC_Resources\xPSDesiredStateConfiguration\8.4.0.0\DSCPullServerSetup\PublishModulesAndMofsToPullServer.psm1:51 char:30
+     Log -Scope $MyInvocation -Message 'End Deployment'
+                              ~~~~~~~~
Unexpected token '-Message' in expression or statement.
At C:\Git\DscWorkshop\DscSample\DSC_Resources\xPSDesiredStateConfiguration\8.4.0.0\DSCPullServerSetup\PublishModulesAndMofsToPullServer.psm1:51 char:39
+     Log -Scope $MyInvocation -Message 'End Deployment'
+                                       ~~~~~~~~~~~~~~~~
Unexpected token ''End Deployment'' in expression or statement.
At C:\Git\DscWorkshop\DscSample\DSC_Resources\xPSDesiredStateConfiguration\8.4.0.0\DSCPullServerSetup\PublishModulesAndMofsToPullServer.psm1:71 char:20
+         Log -Scope $MyInvocation -Message "No additional modules are  ...
+                    ~~~~~~~~~~~~~
Unexpected token '$MyInvocation' in expression or statement.
At C:\Git\DscWorkshop\DscSample\DSC_Resources\xPSDesiredStateConfiguration\8.4.0.0\DSCPullServerSetup\PublishModulesAndMofsToPullServer.psm1:71 char:34
+         Log -Scope $MyInvocation -Message "No additional modules are  ...
+                                  ~~~~~~~~
Unexpected token '-Message' in expression or statement.
At C:\Git\DscWorkshop\DscSample\DSC_Resources\xPSDesiredStateConfiguration\8.4.0.0\DSCPullServerSetup\PublishModulesAndMofsToPullServer.psm1:71 char:43
+ ... cation -Message "No additional modules are specified to be packaged."
+                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Unexpected token '"No additional modules are specified to be packaged."' in expression or statement.
At C:\Git\DscWorkshop\DscSample\DSC_Resources\xPSDesiredStateConfiguration\8.4.0.0\DSCPullServerSetup\PublishModulesAndMofsToPullServer.psm1:85 char:24
+             Log -Scope $MyInvocation -Message "Zipping $name ($versio ...
+                        ~~~~~~~~~~~~~
Unexpected token '$MyInvocation' in expression or statement.
Not all parse errors were reported.  Correct the reported errors and try again.
At C:\Git\DscWorkshop\DscSample\RootConfiguration.ps1:29 char:5
+     node $ConfigurationData.AllNodes.NodeName {
+     ~~~~
    + CategoryInfo          : ParserError: (:) [PSDesiredStateConfiguration\node], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : UnexpectedToken,PSDesiredStateConfiguration\node
 
Error occured during compilation of node 'DSCFile01' : Compilation errors occurred while processing configuration 'RootConfiguration'. Please review the errors reported in error
 stream and modify your configuration code appropriately.
Compilation errors occurred while processing configuration 'RootConfiguration'. Please review the errors reported in error stream and modify your configuration code 
appropriately.
At C:\Windows\System32\WindowsPowerShell\v1.0\Modules\PSDesiredStateConfiguration\PSDesiredStateConfiguration.psm1:3917 char:5
+     throw $ErrorRecord
+     ~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (RootConfiguration:String) [], InvalidOperationException
    + FullyQualifiedErrorId : FailToProcessConfiguration
 
PSDesiredStateConfiguration\node : At 
C:\Git\DscWorkshop\DscSample\DSC_Resources\xPSDesiredStateConfiguration\8.4.0.0\DSCPullServerSetup\PublishModulesAndMofsToPullServer.psm1:41 char:16
+     Log -Scope $MyInvocation -Message 'Start Deployment'
+                ~~~~~~~~~~~~~
Unexpected token '$MyInvocation' in expression or statement.

At C:\Git\DscWorkshop\DscSample\DSC_Resources\xPSDesiredStateConfiguration\8.4.0.0\DSCPullServerSetup\PublishModulesAndMofsToPullServer.psm1:41 char:30
+     Log -Scope $MyInvocation -Message 'Start Deployment'
+                              ~~~~~~~~
Unexpected token '-Message' in expression or statement.

At C:\Git\DscWorkshop\DscSample\DSC_Resources\xPSDesiredStateConfiguration\8.4.0.0\DSCPullServerSetup\PublishModulesAndMofsToPullServer.psm1:41 char:39
+     Log -Scope $MyInvocation -Message 'Start Deployment'
+                                       ~~~~~~~~~~~~~~~~~~
Unexpected token ''Start Deployment'' in expression or statement.

At C:\Git\DscWorkshop\DscSample\DSC_Resources\xPSDesiredStateConfiguration\8.4.0.0\DSCPullServerSetup\PublishModulesAndMofsToPullServer.psm1:51 char:16
+     Log -Scope $MyInvocation -Message 'End Deployment'
+                ~~~~~~~~~~~~~
Unexpected token '$MyInvocation' in expression or statement.

At C:\Git\DscWorkshop\DscSample\DSC_Resources\xPSDesiredStateConfiguration\8.4.0.0\DSCPullServerSetup\PublishModulesAndMofsToPullServer.psm1:51 char:30
+     Log -Scope $MyInvocation -Message 'End Deployment'
+                              ~~~~~~~~
Unexpected token '-Message' in expression or statement.

At C:\Git\DscWorkshop\DscSample\DSC_Resources\xPSDesiredStateConfiguration\8.4.0.0\DSCPullServerSetup\PublishModulesAndMofsToPullServer.psm1:51 char:39
+     Log -Scope $MyInvocation -Message 'End Deployment'
+                                       ~~~~~~~~~~~~~~~~
Unexpected token ''End Deployment'' in expression or statement.

At C:\Git\DscWorkshop\DscSample\DSC_Resources\xPSDesiredStateConfiguration\8.4.0.0\DSCPullServerSetup\PublishModulesAndMofsToPullServer.psm1:71 char:20
+         Log -Scope $MyInvocation -Message "No additional modules are  ...
+                    ~~~~~~~~~~~~~
Unexpected token '$MyInvocation' in expression or statement.

At C:\Git\DscWorkshop\DscSample\DSC_Resources\xPSDesiredStateConfiguration\8.4.0.0\DSCPullServerSetup\PublishModulesAndMofsToPullServer.psm1:71 char:34
+         Log -Scope $MyInvocation -Message "No additional modules are  ...
+                                  ~~~~~~~~
Unexpected token '-Message' in expression or statement.

At C:\Git\DscWorkshop\DscSample\DSC_Resources\xPSDesiredStateConfiguration\8.4.0.0\DSCPullServerSetup\PublishModulesAndMofsToPullServer.psm1:71 char:43
+ ... cation -Message "No additional modules are specified to be packaged."
+                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Unexpected token '"No additional modules are specified to be packaged."' in expression or statement.

At C:\Git\DscWorkshop\DscSample\DSC_Resources\xPSDesiredStateConfiguration\8.4.0.0\DSCPullServerSetup\PublishModulesAndMofsToPullServer.psm1:85 char:24
+             Log -Scope $MyInvocation -Message "Zipping $name ($versio ...
+                        ~~~~~~~~~~~~~
Unexpected token '$MyInvocation' in expression or statement.

Not all parse errors were reported.  Correct the reported errors and try again.
At C:\Git\DscWorkshop\DscSample\RootConfiguration.ps1:29 char:5
+     node $ConfigurationData.AllNodes.NodeName {
+     ~~~~
    + CategoryInfo          : ParserError: (:) [PSDesiredStateConfiguration\node], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : UnexpectedToken,PSDesiredStateConfiguration\node
 
Exception calling "InvokeWithContext" with "2" argument(s): "The 'Get-DscSplattedResource' command was found in the module 'DscBuildHelpers', but the module could not be 
loaded. For more information, run 'Import-Module DscBuildHelpers'."
At C:\Windows\System32\WindowsPowerShell\v1.0\Modules\PSDesiredStateConfiguration\PSDesiredStateConfiguration.psm1:1026 char:21
+ ...             $Value.InvokeWithContext($functionsToDefine, $variablesTo ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : CommandNotFoundException
 


---------------------------------------------------------------------------
DSCWeb01 : DSCWeb01 : MOF__0.0.0 NA
    DSCWeb01 : WebServer ::>  ..........................................................................................OK
    DSCWeb01 : WebServer ::>  ..........................................................................................OK
    DSCWeb01 : WebServer ::>  ..........................................................................................OK
    DSCWeb01 : WebServer ::>  ..........................................................................................OK
    DSCWeb01 : WebServer ::>  ..........................................................................................OK
    DSCWeb01 : WebServer ::>  ..........................................................................................OK 

Errors for scenario 2:

===============================================================================
			COMPILEROOTMETAMOF

-------------------------------------------------------------------------------
  /./CompileRootMetaMof
  C:\Git\DscWorkshop\DscSample\.build\Tasks\CompileRootMetaMof.ps1:1

PSDesiredStateConfiguration\Node : The module 'PSDesiredStateConfigurationEngine' could not be loaded. For more information, run 'Import-Module 
PSDesiredStateConfigurationEngine'.
At C:\Git\DscWorkshop\DscSample\RootMetaMof.ps1:3 char:5
+     Node $ConfigurationData.AllNodes.GetEnumerator().NodeName {
+     ~~~~
    + CategoryInfo          : ObjectNotFound: (PSDesiredStateC...Engine\Settings:String) [PSDesiredStateConfiguration\node], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : CouldNotAutoLoadModule,PSDesiredStateConfiguration\node
 
PSDesiredStateConfiguration\Node : The module 'PSDesiredStateConfigurationEngine' could not be loaded. For more information, run 'Import-Module 
PSDesiredStateConfigurationEngine'.
At C:\Git\DscWorkshop\DscSample\RootMetaMof.ps1:3 char:5
+     Node $ConfigurationData.AllNodes.GetEnumerator().NodeName {
+     ~~~~
    + CategoryInfo          : ObjectNotFound: (PSDesiredStateC...Engine\Settings:String) [PSDesiredStateConfiguration\node], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : CouldNotAutoLoadModule,PSDesiredStateConfiguration\node
 
PSDesiredStateConfiguration\Node : The module 'PSDesiredStateConfigurationEngine' could not be loaded. For more information, run 'Import-Module 
PSDesiredStateConfigurationEngine'.
At C:\Git\DscWorkshop\DscSample\RootMetaMof.ps1:3 char:5
+     Node $ConfigurationData.AllNodes.GetEnumerator().NodeName {
+     ~~~~
    + CategoryInfo          : ObjectNotFound: (PSDesiredStateC...Engine\Settings:String) [PSDesiredStateConfiguration\node], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : CouldNotAutoLoadModule,PSDesiredStateConfiguration\node
 
PSDesiredStateConfiguration\Node : The module 'PSDesiredStateConfigurationEngine' could not be loaded. For more information, run 'Import-Module 
PSDesiredStateConfigurationEngine'.
At C:\Git\DscWorkshop\DscSample\RootMetaMof.ps1:3 char:5
+     Node $ConfigurationData.AllNodes.GetEnumerator().NodeName {
+     ~~~~
    + CategoryInfo          : ObjectNotFound: (PSDesiredStateC...Engine\Settings:String) [PSDesiredStateConfiguration\node], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : CouldNotAutoLoadModule,PSDesiredStateConfiguration\node
 
PSDesiredStateConfiguration\Node : The module 'PSDesiredStateConfigurationEngine' could not be loaded. For more information, run 'Import-Module 
PSDesiredStateConfigurationEngine'.
At C:\Git\DscWorkshop\DscSample\RootMetaMof.ps1:3 char:5
+     Node $ConfigurationData.AllNodes.GetEnumerator().NodeName {
+     ~~~~
    + CategoryInfo          : ObjectNotFound: (PSDesiredStateC...Engine\Settings:String) [PSDesiredStateConfiguration\node], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : CouldNotAutoLoadModule,PSDesiredStateConfiguration\node
 
PSDesiredStateConfiguration\Node : The module 'PSDesiredStateConfigurationEngine' could not be loaded. For more information, run 'Import-Module 
PSDesiredStateConfigurationEngine'.
At C:\Git\DscWorkshop\DscSample\RootMetaMof.ps1:3 char:5
+     Node $ConfigurationData.AllNodes.GetEnumerator().NodeName {
+     ~~~~
    + CategoryInfo          : ObjectNotFound: (PSDesiredStateC...Engine\Settings:String) [PSDesiredStateConfiguration\node], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : CouldNotAutoLoadModule,PSDesiredStateConfiguration\node
 
Write-MetaConfigFile : Invalid MOF definition for node 'DSCFile01': Exception calling "ValidateInstanceText" with "1" argument(s): "Syntax error: 
 At line:10, char:1
 Buffer:
Configuration1ref 
{
}^;
in
"
At C:\Windows\System32\WindowsPowerShell\v1.0\Modules\PSDesiredStateConfiguration\PSDesiredStateConfiguration.psm1:2361 char:21
+ ...             Write-MetaConfigFile $Name $mofNode $Script:NodeInstanceA ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [Write-Error], InvalidOperationException
    + FullyQualifiedErrorId : InvalidMOFDefinition,Write-MetaConfigFile
Write-MetaConfigFile : Invalid MOF definition for node 'DSCWeb01': Exception calling "ValidateInstanceText" with "1" argument(s): "Syntax error: 
 At line:10, char:1
 Buffer:
Configuration1ref 
{
}^;
in
"
At C:\Windows\System32\WindowsPowerShell\v1.0\Modules\PSDesiredStateConfiguration\PSDesiredStateConfiguration.psm1:2361 char:21
+ ...             Write-MetaConfigFile $Name $mofNode $Script:NodeInstanceA ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [Write-Error], InvalidOperationException
    + FullyQualifiedErrorId : InvalidMOFDefinition,Write-MetaConfigFile
Write-MetaConfigFile : Invalid MOF definition for node 'DSCFile02': Exception calling "ValidateInstanceText" with "1" argument(s): "Syntax error: 
 At line:10, char:1
 Buffer:
Configuration1ref 
{
}^;
in
"
At C:\Windows\System32\WindowsPowerShell\v1.0\Modules\PSDesiredStateConfiguration\PSDesiredStateConfiguration.psm1:2361 char:21
+ ...             Write-MetaConfigFile $Name $mofNode $Script:NodeInstanceA ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [Write-Error], InvalidOperationException
    + FullyQualifiedErrorId : InvalidMOFDefinition,Write-MetaConfigFile
Write-MetaConfigFile : Invalid MOF definition for node 'DSCWeb02': Exception calling "ValidateInstanceText" with "1" argument(s): "Syntax error: 
 At line:10, char:1
 Buffer:
Configuration1ref 
{
}^;
in
"
At C:\Windows\System32\WindowsPowerShell\v1.0\Modules\PSDesiredStateConfiguration\PSDesiredStateConfiguration.psm1:2361 char:21
+ ...             Write-MetaConfigFile $Name $mofNode $Script:NodeInstanceA ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [Write-Error], InvalidOperationException
    + FullyQualifiedErrorId : InvalidMOFDefinition,Write-MetaConfigFile
Write-MetaConfigFile : Invalid MOF definition for node 'DSCFile03': Exception calling "ValidateInstanceText" with "1" argument(s): "Syntax error: 
 At line:10, char:1
 Buffer:
Configuration1ref 
{
}^;
in
"
At C:\Windows\System32\WindowsPowerShell\v1.0\Modules\PSDesiredStateConfiguration\PSDesiredStateConfiguration.psm1:2361 char:21
+ ...             Write-MetaConfigFile $Name $mofNode $Script:NodeInstanceA ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [Write-Error], InvalidOperationException
    + FullyQualifiedErrorId : InvalidMOFDefinition,Write-MetaConfigFile
Write-MetaConfigFile : Invalid MOF definition for node 'DSCWeb03': Exception calling "ValidateInstanceText" with "1" argument(s): "Syntax error: 
 At line:10, char:1
 Buffer:
Configuration1ref 
{
}^;
in
"
At C:\Windows\System32\WindowsPowerShell\v1.0\Modules\PSDesiredStateConfiguration\PSDesiredStateConfiguration.psm1:2361 char:21
+ ...             Write-MetaConfigFile $Name $mofNode $Script:NodeInstanceA ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [Write-Error], InvalidOperationException
    + FullyQualifiedErrorId : InvalidMOFDefinition,Write-MetaConfigFile
ERROR: Compilation errors occurred while processing configuration 'RootMetaMOF'. Please review the errors reported in error stream and modify your configuration code appropriate
ly.
At C:\Windows\System32\WindowsPowerShell\v1.0\Modules\PSDesiredStateConfiguration\PSDesiredStateConfiguration.psm1:3917 char:5
+     throw $ErrorRecord
+     ~~~~~~~~~~~~~~~~~~
At C:\Git\DscWorkshop\DscSample\.build\Tasks\CompileRootMetaMof.ps1:1 char:1
+ task CompileRootMetaMof {
+ ~~~~~~~~~~~~~~~~~~~~~~~~~
At C:\Git\DscWorkshop\DscSample\Build.ps1:192 char:9
+         task . Init,
+         ~~~~~~~~~~~~
Build FAILED. 10 tasks, 1 errors, 0 warnings 00:00:41.1581847
Compilation errors occurred while processing configuration 'RootMetaMOF'. Please review the errors reported in error stream and modify your configuration code appropriately.
At C:\Windows\System32\WindowsPowerShell\v1.0\Modules\PSDesiredStateConfiguration\PSDesiredStateConfiguration.psm1:3917 char:5
+     throw $ErrorRecord
+     ~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (RootMetaMOF:String) [], InvalidOperationException
    + FullyQualifiedErrorId : FailToProcessConfiguration 

Build DSC Artifacts step of azuredevops pipeline failure

Problem description

Hello,
I am running the lab deployment with local Hyper-v AzureDevOps scenario, based on Server 2022, Azure Devops Server 2022 and SQL server 2019.
When running the Devops pipeline I get a failure at the Build DSC Artifacts stage. I included the log at the bottom.
When I run the same cmd ( C:\BuildWorker1_work\2\s> .\build.ps1 -ResolveDependency -tasks build ) in a powershell window directly on the buildworker machine, I still get the same errors but the build finishes and generates the artifacts. One additional message I see in the direct execute in powershell is this one.

Verbose logs

Log snipped from the AzureDevops pipeline:

Formatted command: . 'C:\BuildWorker1\_work\2\s\build.ps1' -ResolveDependency -tasks build
========================== Starting Command Output ===========================
"C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -NoLogo -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -Command ". 'C:\BuildWorker1\_work\_temp\4a444eb0-bab9-4db7-b4fa-4dcaa757d362.ps1'"
[pre-build] Starting Build Init
[pre-build] Creating required modules directory C:\BuildWorker1\_work\2\s\output\RequiredModules.
[pre-build] Pre-pending 'C:\BuildWorker1\_work\2\s\output\RequiredModules' folder to PSModulePath
[pre-build] Resolving dependencies.
[pre-build] Starting bootstrap process.
WARNING: Error attempting to import Bootstrap's default parameters from 
'C:\BuildWorker1\_work\2\s\Resolve-Dependency.psd1': The file 'C:\BuildWorker1\_work\2\s\Resolve-Dependency.psd1' could
 not be parsed as a PowerShell Data File..
PackageManagement\Save-Package : No match was found for the specified search criteria and module name 'Sampler'. Try 
Get-PSRepository to see all available registered module repositories.
At 
C:\Windows\system32\config\systemprofile\Documents\WindowsPowerShell\Modules\PowerShellGet\2.2.5\PSModule.psm1:11794 
char:21
+             $null = PackageManagement\Save-Package @PSBoundParameters
+                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Microsoft.Power...ets.SavePackage:SavePackage) [Save-Package], Exceptio 
   n
    + FullyQualifiedErrorId : NoMatchFoundForCriteria,Microsoft.PowerShell.PackageManagement.Cmdlets.SavePackage
 
##[error]PowerShell exited with code '1'.
Finishing: Build DSC Artifacts

Console output from the direct execution on the buildworker machine.

PS C:\BuildWorker1\_work\2\s> .\C:\BuildWorker1\_work\2\s\build.ps1 -ResolveDependency -tasks build
.\C:\BuildWorker1\_work\2\s\build.ps1 : The term '.\C:\BuildWorker1\_work\2\s\build.ps1' is not recognized as the name
of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included,     verify that the path is correct and try again.                                                                          At line:1 char:1                                                                                                        + .\C:\BuildWorker1\_work\2\s\build.ps1 -ResolveDependency -tasks build                                                 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                                                                                     + CategoryInfo          : ObjectNotFound: (.\C:\BuildWorker1\_work\2\s\build.ps1:String) [], CommandNotFoundExcept     ion                                                                                                                      + FullyQualifiedErrorId : CommandNotFoundException                                                                                                                                                                                          PS C:\BuildWorker1\_work\2\s> .\build.ps1 -ResolveDependency -tasks build                                               [pre-build] Starting Build Init                                                                                         [pre-build] Pre-pending 'C:\BuildWorker1\_work\2\s\output\RequiredModules' folder to PSModulePath                       [pre-build] Resolving dependencies.                                                                                     [pre-build] Starting bootstrap process.                                                                                 Import-PowerShellDataFile : The file 'C:\BuildWorker1\_work\2\s\Resolve-Dependency.psd1' could not be parsed as a       PowerShell Data File.                                                                                                   At C:\BuildWorker1\_work\2\s\Resolve-Dependency.ps1:131 char:34                                                         + ... yDefaults = Import-PowerShellDataFile -Path $resolveDependencyConfigP ...                                         +                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                                                 + CategoryInfo          : InvalidData: (:) [Import-PowerShellDataFile], InvalidOperationException                       + FullyQualifiedErrorId : CouldNotParseAsPowerShellDataFile,Import-PowerShellDataFile

WARNING: Error attempting to import Bootstrap's default parameters from
'C:\BuildWorker1\_work\2\s\Resolve-Dependency.psd1': You cannot call a method on a null-valued expression..
WARNING: The version '1.4.8.1' of module 'PackageManagement' is currently in use. Retry the operation after closing the
 applications.
PackageManagement\Save-Package : No match was found for the specified search criteria and module name 'Sampler'. Try
Get-PSRepository to see all available registered module repositories.
At C:\Users\Install.contoso\Documents\WindowsPowerShell\Modules\PowerShellGet\2.2.5\PSModule.psm1:11794 char:21
+             $null = PackageManagement\Save-Package @PSBoundParameters
+                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Microsoft.Power...ets.SavePackage:SavePackage) [Save-Package], Exceptio
   n
    + FullyQualifiedErrorId : NoMatchFoundForCriteria,Microsoft.PowerShell.PackageManagement.Cmdlets.SavePackage

PackageManagement\Save-Package : No match was found for the specified search criteria and module name
'powershell-yaml'. Try Get-PSRepository to see all available registered module repositories.
At C:\Users\Install.contoso\Documents\WindowsPowerShell\Modules\PowerShellGet\2.2.5\PSModule.psm1:11794 char:21
+             $null = PackageManagement\Save-Package @PSBoundParameters
+                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Microsoft.Power...ets.SavePackage:SavePackage) [Save-Package], Exceptio
   n
    + FullyQualifiedErrorId : NoMatchFoundForCriteria,Microsoft.PowerShell.PackageManagement.Cmdlets.SavePackage

PackageManagement\Save-Package : No match was found for the specified search criteria and module name 'Plaster'. Try
Get-PSRepository to see all available registered module repositories.
At C:\Users\Install.contoso\Documents\WindowsPowerShell\Modules\PowerShellGet\2.2.5\PSModule.psm1:11794 char:21
+             $null = PackageManagement\Save-Package @PSBoundParameters
+                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Microsoft.Power...ets.SavePackage:SavePackage) [Save-Package], Exceptio
   n
    + FullyQualifiedErrorId : NoMatchFoundForCriteria,Microsoft.PowerShell.PackageManagement.Cmdlets.SavePackage

[build] Starting build with InvokeBuild.
[build] Parsing defined tasks
[build] Loading Configuration from C:\BuildWorker1\_work\2\s\build.yaml
[build] Pre-pending 'C:\BuildWorker1\_work\2\s\output\AvoidPSPathOverlap' folder to PSModulePath
Importing tasks from module Sampler
         Loading Build-Module.ModuleBuilder.build.Sampler.ib.tasks...
         Loading ChocolateyPackage.build.Sampler.ib.tasks...
         Loading Clean.ModuleBuilder.build.Sampler.ib.tasks...
         Loading Create_Changelog_Branch.build.Sampler.ib.tasks...
         Loading Create_Release_Git_Tag.build.Sampler.ib.tasks...
         Loading DeployAll.PSDeploy.build.Sampler.ib.tasks...
         Loading DscResource.Test.build.Sampler.ib.tasks...
         Loading generateHelp.PlatyPS.build.Sampler.ib.tasks...
         Loading GuestConfig.build.Sampler.ib.tasks...
         Loading Invoke-Pester.pester.build.Sampler.ib.tasks...
         Loading JaCoCo.coverage.build.Sampler.ib.tasks...
         Loading release.module.build.Sampler.ib.tasks...
         Loading Set-SamplerTaskVariable...
Importing tasks from module Sampler.DscPipeline
         Loading CompileDatumRsop.build.Sampler.DscPipeline.ib.tasks...
         Loading CompileRootConfiguration.build.Sampler.DscPipeline.ib.tasks...
         Loading CompileRootMetaMof.build.Sampler.DscPipeline.ib.tasks...
         Loading CompressArtifactCollections.build.Sampler.DscPipeline.ib.tasks...
         Loading CompressModulesWithChecksum.build.Sampler.DscPipeline.ib.tasks...
         Loading LoadDatumConfigData.build.Sampler.DscPipeline.ib.tasks...
         Loading NewMofChecksums.build.Sampler.DscPipeline.ib.tasks...
         Loading TestBuildAcceptance.build.Sampler.DscPipeline.ib.tasks...
         Loading TestConfigData.build.Sampler.DscPipeline.ib.tasks...
         Loading TestDscResources.build.Sampler.DscPipeline.ib.tasks...
Adding Workflow from configuration:
  +-> pack
  +-> init
  +-> build
  +-> .
[build] Executing requested workflow: build
Build build C:\BuildWorker1\_work\2\s\build.ps1
Redefined task '.'.

===============================================================================
                        INIT

-------------------------------------------------------------------------------
  /build/Init
  C:\BuildWorker1\_work\2\s\build.ps1:331

Done /build/Init 00:00:00.2126217

===============================================================================
                        CLEAN
Deleting the content of the Build Output folder, except ./modules
-------------------------------------------------------------------------------
  /build/Clean
  C:\BuildWorker1\_work\2\s\output\RequiredModules\Sampler\0.116.1\tasks\Clean.ModuleBuilder.build.ps1:16

Removing C:\BuildWorker1\_work\2\s\output\* excluding RequiredModules
Done /build/Clean 00:00:00.0511637

===============================================================================
                        LOADDATUMCONFIGDATA

-------------------------------------------------------------------------------
  /build/LoadDatumConfigData
  C:\BuildWorker1\_work\2\s\output\RequiredModules\Sampler.DscPipeline\0.2.0\tasks\LoadDatumConfigData.build.ps1:30

Loading Datum Definition from 'C:\BuildWorker1\_work\2\s\source\Datum.yml'
Done /build/LoadDatumConfigData 00:00:02.8034676

===============================================================================
                        TESTCONFIGDATA

-------------------------------------------------------------------------------
  /build/TestConfigData
  C:\BuildWorker1\_work\2\s\output\RequiredModules\Sampler.DscPipeline\0.2.0\tasks\TestConfigData.build.ps1:43

        Project Name               = 'DscWorkshop'
        Source Path                = 'source'
        Output Directory           = 'C:\BuildWorker1\_work\2\s\output'
        Release Notes path         = 'C:\BuildWorker1\_work\2\s\output\ReleaseNotes.md'
        Built Module Subdirectory  = 'C:\BuildWorker1\_work\2\s\output\AvoidPSPathOverlap'
        Module Manifest Path (src) = 'C:\BuildWorker1\_work\2\s\source\DscWorkshop.psd1'
        Module Version             = '0.4'

        Pester Output Folder    = 'C:\BuildWorker1\_work\2\s\output\testResults
Creating folder C:\BuildWorker1\_work\2\s\output\testResults
Config Data Pester Scripts = [C:\BuildWorker1\_work\2\s\tests\ConfigData]
TestResultsPath is: C:\BuildWorker1\_work\2\s\output\testResults\IntegrationTestResults.xml
OutputDirectory is: C:\BuildWorker1\_work\2\s\output\testResults
Pester v5.3.3

Starting discovery in 2 files.
DSC Composite / Resource Module Table for 'DscConfig.Demo' with version 'NA'
-------------------------------------

DscResourceFileName                      DscResourceName              VersionInCompositeResource VersionInPSDependFile
-------------------                      ---------------              -------------------------- ---------------------
DscLcmController.schema.psm1             ComputerManagementDsc                                   8.5.0
SmbShares.schema.psm1                    ComputerManagementDsc                                   8.5.0
SecurityBase.schema.psm1                 ComputerManagementDsc                                   8.5.0
WindowsEventLogs.schema.psm1             ComputerManagementDsc                                   8.5.0
ComputerSettings.schema.psm1             ComputerManagementDsc                                   8.5.0
FilesAndFolders.schema.psm1              FileSystemDsc                                           1.1.1
DscDiagnostic.schema.psm1                JeaDsc                                                  0.7.2
NetworkIpConfiguration.schema.psm1       NetworkingDsc                                           9.0.0
SecurityBase.schema.psm1                 SecurityPolicyDsc                                       2.10.0.0
Scripts.schema.psm1                      xPSDesiredStateConfiguration                            9.1.0
WindowsServices.schema.psm1              xPSDesiredStateConfiguration                            9.1.0
SoftwarePackages.schema.psm1             xPSDesiredStateConfiguration                            9.1.0
SecurityBase.schema.psm1                 xPSDesiredStateConfiguration                            9.1.0
RegistryValues.schema.psm1               xPSDesiredStateConfiguration                            9.1.0
DscLcmMaintenanceWindows.schema.psm1     xPSDesiredStateConfiguration                            9.1.0
DscTagging.schema.psm1                   xPSDesiredStateConfiguration                            9.1.0
DscLcmController.schema.psm1             xPSDesiredStateConfiguration                            9.1.0
ConfigurationBase.schema.psm1            xPSDesiredStateConfiguration                            9.1.0
LocalUsers.schema.psm1                   xPSDesiredStateConfiguration                            9.1.0
NetworkIpConfiguration.schema.psm1       xPSDesiredStateConfiguration                            9.1.0
EnvironmentVariables.schema.psm1         xPSDesiredStateConfiguration                            9.1.0
LocalGroups.schema.psm1                  xPSDesiredStateConfiguration                            9.1.0
WebVirtualDirectories.schema.psm1        xWebAdministration                                      3.3.0
WebApplicationPools.schema.psm1          xWebAdministration                                      3.3.0
Websites.schema.psm1                     xWebAdministration                                      3.3.0
WebApplications.schema.psm1              xWebAdministration                                      3.3.0
WebConfigProperties.schema.psm1          xWebAdministration                                      3.3.0
WebConfigPropertyCollections.schema.psm1 xWebAdministration                                      3.3.0



-------------------------------------
Discovery found 130 tests in 1.92s.
Filter 'Tag' set to ('Integration').
Filters selected 130 tests to run.
Running tests.

Running tests from 'CompositeResources.Tests.ps1'
Describing Resources matching between Composite Resources and PSDepend file
 Context Composite Resources import correct DSC Resources
   [+] DSC Resource Module 'ComputerManagementDsc' is defined in 'RequiredModules.psd1' 466ms (188ms|278ms)
   [+] DSC Resource Module 'xPSDesiredStateConfiguration' is defined in 'RequiredModules.psd1' 10ms (7ms|3ms)
   [+] DSC Resource Module 'JeaDsc' is defined in 'RequiredModules.psd1' 12ms (9ms|4ms)
   [+] DSC Resource Module 'xPSDesiredStateConfiguration' is defined in 'RequiredModules.psd1' 79ms (72ms|7ms)
   [+] DSC Resource Module 'ComputerManagementDsc' is defined in 'RequiredModules.psd1' 30ms (9ms|21ms)
   [+] DSC Resource Module 'xPSDesiredStateConfiguration' is defined in 'RequiredModules.psd1' 11ms (7ms|5ms)
   [+] DSC Resource Module 'xPSDesiredStateConfiguration' is defined in 'RequiredModules.psd1' 10ms (6ms|4ms)
   [+] DSC Resource Module 'xPSDesiredStateConfiguration' is defined in 'RequiredModules.psd1' 8ms (5ms|3ms)
   [+] DSC Resource Module 'FileSystemDsc' is defined in 'RequiredModules.psd1' 13ms (8ms|5ms)
   [+] DSC Resource Module 'xPSDesiredStateConfiguration' is defined in 'RequiredModules.psd1' 13ms (8ms|4ms)
   [+] DSC Resource Module 'xPSDesiredStateConfiguration' is defined in 'RequiredModules.psd1' 12ms (7ms|4ms)
   [+] DSC Resource Module 'xPSDesiredStateConfiguration' is defined in 'RequiredModules.psd1' 15ms (6ms|9ms)
   [+] DSC Resource Module 'NetworkingDsc' is defined in 'RequiredModules.psd1' 19ms (14ms|4ms)
   [+] DSC Resource Module 'xPSDesiredStateConfiguration' is defined in 'RequiredModules.psd1' 227ms (6ms|221ms)
   [+] DSC Resource Module 'xPSDesiredStateConfiguration' is defined in 'RequiredModules.psd1' 13ms (8ms|4ms)
   [+] DSC Resource Module 'xPSDesiredStateConfiguration' is defined in 'RequiredModules.psd1' 23ms (10ms|13ms)
   [+] DSC Resource Module 'SecurityPolicyDsc' is defined in 'RequiredModules.psd1' 11ms (7ms|4ms)
   [+] DSC Resource Module 'ComputerManagementDsc' is defined in 'RequiredModules.psd1' 10ms (6ms|4ms)
   [+] DSC Resource Module 'ComputerManagementDsc' is defined in 'RequiredModules.psd1' 11ms (7ms|4ms)
   [+] DSC Resource Module 'xPSDesiredStateConfiguration' is defined in 'RequiredModules.psd1' 19ms (10ms|8ms)
   [+] DSC Resource Module 'xWebAdministration' is defined in 'RequiredModules.psd1' 13ms (6ms|7ms)
   [+] DSC Resource Module 'xWebAdministration' is defined in 'RequiredModules.psd1' 13ms (9ms|4ms)
   [+] DSC Resource Module 'xWebAdministration' is defined in 'RequiredModules.psd1' 11ms (6ms|4ms)
   [+] DSC Resource Module 'xWebAdministration' is defined in 'RequiredModules.psd1' 13ms (9ms|4ms)
   [+] DSC Resource Module 'xWebAdministration' is defined in 'RequiredModules.psd1' 19ms (13ms|6ms)
   [+] DSC Resource Module 'xWebAdministration' is defined in 'RequiredModules.psd1' 17ms (12ms|4ms)
   [+] DSC Resource Module 'ComputerManagementDsc' is defined in 'RequiredModules.psd1' 15ms (9ms|6ms)
   [+] DSC Resource Module 'xPSDesiredStateConfiguration' is defined in 'RequiredModules.psd1' 11ms (7ms|4ms)
   [+] Version of 'ComputerManagementDsc' in 'ComputerSettings.schema.psm1' is equal to version in 'RequiredModules.psd1' 10ms (5ms|5ms)
   [+] Version of 'xPSDesiredStateConfiguration' in 'ConfigurationBase.schema.psm1' is equal to version in 'RequiredModules.psd1' 10ms (3ms|7ms)
   [+] Version of 'JeaDsc' in 'DscDiagnostic.schema.psm1' is equal to version in 'RequiredModules.psd1' 8ms (4ms|5ms)
   [+] Version of 'xPSDesiredStateConfiguration' in 'DscLcmController.schema.psm1' is equal to version in 'RequiredModules.psd1' 18ms (3ms|15ms)
   [+] Version of 'ComputerManagementDsc' in 'DscLcmController.schema.psm1' is equal to version in 'RequiredModules.psd1' 206ms (200ms|6ms)
   [+] Version of 'xPSDesiredStateConfiguration' in 'DscLcmMaintenanceWindows.schema.psm1' is equal to version in 'RequiredModules.psd1' 7ms (3ms|4ms)
   [+] Version of 'xPSDesiredStateConfiguration' in 'DscTagging.schema.psm1' is equal to version in 'RequiredModules.psd1' 7ms (3ms|4ms)
   [+] Version of 'xPSDesiredStateConfiguration' in 'EnvironmentVariables.schema.psm1' is equal to version in 'RequiredModules.psd1' 7ms (3ms|4ms)
   [+] Version of 'FileSystemDsc' in 'FilesAndFolders.schema.psm1' is equal to version in 'RequiredModules.psd1' 7ms (3ms|4ms)
   [+] Version of 'xPSDesiredStateConfiguration' in 'LocalGroups.schema.psm1' is equal to version in 'RequiredModules.psd1' 28ms (24ms|4ms)
   [+] Version of 'xPSDesiredStateConfiguration' in 'LocalUsers.schema.psm1' is equal to version in 'RequiredModules.psd1' 7ms (3ms|4ms)
   [+] Version of 'xPSDesiredStateConfiguration' in 'NetworkIpConfiguration.schema.psm1' is equal to version in 'RequiredModules.psd1' 17ms (13ms|4ms)
   [+] Version of 'NetworkingDsc' in 'NetworkIpConfiguration.schema.psm1' is equal to version in 'RequiredModules.psd1' 7ms (3ms|4ms)
   [+] Version of 'xPSDesiredStateConfiguration' in 'RegistryValues.schema.psm1' is equal to version in 'RequiredModules.psd1' 7ms (3ms|4ms)
   [+] Version of 'xPSDesiredStateConfiguration' in 'Scripts.schema.psm1' is equal to version in 'RequiredModules.psd1' 10ms (6ms|4ms)
   [+] Version of 'xPSDesiredStateConfiguration' in 'SecurityBase.schema.psm1' is equal to version in 'RequiredModules.psd1' 7ms (3ms|4ms)
   [+] Version of 'SecurityPolicyDsc' in 'SecurityBase.schema.psm1' is equal to version in 'RequiredModules.psd1' 7ms (3ms|4ms)
   [+] Version of 'ComputerManagementDsc' in 'SecurityBase.schema.psm1' is equal to version in 'RequiredModules.psd1' 8ms (3ms|5ms)
   [+] Version of 'ComputerManagementDsc' in 'SmbShares.schema.psm1' is equal to version in 'RequiredModules.psd1' 7ms (3ms|4ms)
   [+] Version of 'xPSDesiredStateConfiguration' in 'SoftwarePackages.schema.psm1' is equal to version in 'RequiredModules.psd1' 9ms (3ms|6ms)
   [+] Version of 'xWebAdministration' in 'WebApplicationPools.schema.psm1' is equal to version in 'RequiredModules.psd1' 17ms (14ms|3ms)
   [+] Version of 'xWebAdministration' in 'WebApplications.schema.psm1' is equal to version in 'RequiredModules.psd1' 31ms (26ms|5ms)
   [+] Version of 'xWebAdministration' in 'WebConfigProperties.schema.psm1' is equal to version in 'RequiredModules.psd1' 8ms (4ms|4ms)
   [+] Version of 'xWebAdministration' in 'WebConfigPropertyCollections.schema.psm1' is equal to version in 'RequiredModules.psd1' 8ms (3ms|5ms)
   [+] Version of 'xWebAdministration' in 'Websites.schema.psm1' is equal to version in 'RequiredModules.psd1' 8ms (3ms|4ms)
   [+] Version of 'xWebAdministration' in 'WebVirtualDirectories.schema.psm1' is equal to version in 'RequiredModules.psd1' 10ms (7ms|3ms)
   [+] Version of 'ComputerManagementDsc' in 'WindowsEventLogs.schema.psm1' is equal to version in 'RequiredModules.psd1' 9ms (4ms|4ms)
   [+] Version of 'xPSDesiredStateConfiguration' in 'WindowsServices.schema.psm1' is equal to version in 'RequiredModules.psd1' 7ms (3ms|5ms)

Running tests from 'ConfigData.Tests.ps1'
Describing Validate All Definition Files
  [+] 'DSCFile01.yml' is a valid yaml 156ms (137ms|19ms)
  [+] 'DSCWeb01.yml' is a valid yaml 80ms (76ms|3ms)
  [+] 'DSCFile03.yml' is a valid yaml 46ms (38ms|8ms)
  [+] 'DSCWeb03.yml' is a valid yaml 37ms (35ms|2ms)
  [+] 'DSCFile02.yml' is a valid yaml 56ms (54ms|2ms)
  [+] 'DSCWeb02.yml' is a valid yaml 48ms (44ms|4ms)
  [+] 'DscLcm.yml' is a valid yaml 115ms (110ms|5ms)
  [+] 'Security.yml' is a valid yaml 26ms (23ms|3ms)
  [+] 'Server.yml' is a valid yaml 69ms (48ms|21ms)
  [+] 'Dev.yml' is a valid yaml 29ms (27ms|2ms)
  [+] 'Prod.yml' is a valid yaml 20ms (18ms|2ms)
  [+] 'Test.yml' is a valid yaml 19ms (17ms|2ms)
  [+] 'Domain.yml' is a valid yaml 16ms (14ms|2ms)
  [+] 'Frankfurt.yml' is a valid yaml 30ms (23ms|7ms)
  [+] 'London.yml' is a valid yaml 25ms (22ms|3ms)
  [+] 'Singapore.yml' is a valid yaml 23ms (20ms|3ms)
  [+] 'Tokio.yml' is a valid yaml 37ms (33ms|3ms)
  [+] 'DomainController.yml' is a valid yaml 29ms (27ms|2ms)
  [+] 'FileServer.yml' is a valid yaml 118ms (115ms|2ms)
  [+] 'WebServer.yml' is a valid yaml 135ms (131ms|3ms)
  [+] 'Datum.yml' is a valid yaml 74ms (72ms|2ms)

Describing Datum Tree Definition
  [+] Exists in source Folder 98ms (86ms|12ms)
  [+] Is Valid Yaml 67ms (64ms|3ms)
  [+] 'Get-FilteredConfigurationData' returned data 13ms (11ms|2ms)

Describing Node Definition Files
 Context Testing for conflicts / duplicate data
   [+] Should not have duplicate node names 26ms (5ms|20ms)
  [+] 'DSCFile01' has valid yaml 56ms (50ms|5ms)
  [+] 'DSCWeb01' has valid yaml 42ms (40ms|2ms)
  [+] 'DSCFile03' has valid yaml 45ms (43ms|2ms)
  [+] 'DSCWeb03' has valid yaml 34ms (26ms|7ms)
  [+] 'DSCFile02' has valid yaml 36ms (34ms|2ms)
  [+] 'DSCWeb02' has valid yaml 39ms (35ms|3ms)
  [!] 'DSCFile01' is in the right environment is skipped, because Environment for 'DSCFile01' is either not set or like '[x=*' 70ms (62ms|8ms)
  [!] 'DSCWeb01' is in the right environment is skipped, because Environment for 'DSCWeb01' is either not set or like '[x=*' 7ms (4ms|3ms)
  [!] 'DSCFile03' is in the right environment is skipped, because Environment for 'DSCFile03' is either not set or like '[x=*' 7ms (5ms|2ms)
  [!] 'DSCWeb03' is in the right environment is skipped, because Environment for 'DSCWeb03' is either not set or like '[x=*' 14ms (7ms|7ms)
  [!] 'DSCFile02' is in the right environment is skipped, because Environment for 'DSCFile02' is either not set or like '[x=*' 11ms (8ms|3ms)
  [!] 'DSCWeb02' is in the right environment is skipped, because Environment for 'DSCWeb02' is either not set or like '[x=*' 19ms (10ms|9ms)
  [+] Location of 'DSCFile01' is 'Frankfurt' and does exist 15ms (11ms|5ms)
  [+] Location of 'DSCWeb01' is 'Singapore' and does exist 7ms (4ms|3ms)
  [+] Location of 'DSCFile03' is 'Frankfurt' and does exist 16ms (8ms|8ms)
  [+] Location of 'DSCWeb03' is 'Singapore' and does exist 6ms (4ms|2ms)
  [+] Location of 'DSCFile02' is 'Frankfurt' and does exist 7ms (5ms|2ms)
  [+] Location of 'DSCWeb02' is 'Singapore' and does exist 12ms (9ms|3ms)
  [!] Environment of 'DSCFile01' is '[x={ $File.Directory.BaseName } =]' and does exist is skipped, because Environment for 'DSCFile01' is either not set or like '[x=*' 27ms (17ms|10ms)
  [!] Environment of 'DSCWeb01' is '[x={ $File.Directory.BaseName } =]' and does exist is skipped, because Environment for 'DSCWeb01' is either not set or like '[x=*' 26ms (15ms|11ms)
  [!] Environment of 'DSCFile03' is '[x={ $File.Directory.BaseName } =]' and does exist is skipped, because Environment for 'DSCFile03' is either not set or like '[x=*' 57ms (47ms|10ms)
  [!] Environment of 'DSCWeb03' is '[x={ $File.Directory.BaseName } =]' and does exist is skipped, because Environment for 'DSCWeb03' is either not set or like '[x=*' 26ms (18ms|8ms)
  [!] Environment of 'DSCFile02' is '[x={ $File.Directory.BaseName } =]' and does exist is skipped, because Environment for 'DSCFile02' is either not set or like '[x=*' 19ms (10ms|9ms)
  [!] Environment of 'DSCWeb02' is '[x={ $File.Directory.BaseName } =]' and does exist is skipped, because Environment for 'DSCWeb02' is either not set or like '[x=*' 12ms (8ms|4ms)
  [+] Role of 'DSCFile01' is 'FileServer' and does exist 8ms (6ms|2ms)
  [+] Role of 'DSCWeb01' is 'WebServer' and does exist 27ms (6ms|21ms)
  [+] Role of 'DSCFile03' is 'FileServer' and does exist 7ms (4ms|4ms)
  [+] Role of 'DSCWeb03' is 'WebServer' and does exist 7ms (5ms|2ms)
  [+] Role of 'DSCFile02' is 'FileServer' and does exist 7ms (4ms|3ms)
  [+] Role of 'DSCWeb02' is 'WebServer' and does exist 17ms (12ms|4ms)
  [+] Baseline of 'DSCFile01' is 'Server' and does exist 9ms (5ms|4ms)
  [+] Baseline of 'DSCWeb01' is 'Server' and does exist 10ms (6ms|4ms)
  [+] Baseline of 'DSCFile03' is 'Server' and does exist 9ms (5ms|4ms)
  [+] Baseline of 'DSCWeb03' is 'Server' and does exist 22ms (19ms|4ms)
  [+] Baseline of 'DSCFile02' is 'Server' and does exist 13ms (4ms|9ms)
  [+] Baseline of 'DSCWeb02' is 'Server' and does exist 10ms (7ms|3ms)
 Describing Roles Definition Files
   [+] C:\BuildWorker1\_work\2\s\source\Roles\FileServer.yml has valid yaml 96ms (87ms|9ms)
   [+] C:\BuildWorker1\_work\2\s\source\Roles\WebServer.yml has valid yaml 120ms (117ms|2ms)
   [+] C:\BuildWorker1\_work\2\s\source\Roles\FileServer.yml has valid yaml 42ms (40ms|2ms)
   [+] C:\BuildWorker1\_work\2\s\source\Roles\WebServer.yml has valid yaml 158ms (154ms|4ms)
   [+] C:\BuildWorker1\_work\2\s\source\Roles\FileServer.yml has valid yaml 90ms (87ms|2ms)
   [+] C:\BuildWorker1\_work\2\s\source\Roles\WebServer.yml has valid yaml 148ms (144ms|4ms)
 Describing Role Composition
   [+] DSCFile01 has a valid Configurations Setting (!$null) 1.89s (1.87s|17ms)
   [+] DSCWeb01 has a valid Configurations Setting (!$null) 821ms (818ms|4ms)
   [+] DSCFile03 has a valid Configurations Setting (!$null) 552ms (550ms|2ms)
   [+] DSCWeb03 has a valid Configurations Setting (!$null) 578ms (575ms|4ms)
   [+] DSCFile02 has a valid Configurations Setting (!$null) 651ms (639ms|12ms)
   [+] DSCWeb02 has a valid Configurations Setting (!$null) 515ms (512ms|4ms)
   [+] No duplicate IP addresses should be used 31ms (28ms|2ms)
Tests completed in 18.32s
Tests Passed: 118, Failed: 0, Skipped: 12 NotRun: 0
Done /build/TestConfigData 00:00:23.1797650

===============================================================================
                        COMPILEDATUMRSOP

-------------------------------------------------------------------------------
  /build/CompileDatumRsop
  C:\BuildWorker1\_work\2\s\output\RequiredModules\Sampler.DscPipeline\0.2.0\tasks\CompileDatumRsop.build.ps1:43

        Project Name               = 'DscWorkshop'
        Source Path                = 'source'
        Output Directory           = 'C:\BuildWorker1\_work\2\s\output'
        Release Notes path         = 'C:\BuildWorker1\_work\2\s\output\ReleaseNotes.md'                                         Built Module Subdirectory  = 'C:\BuildWorker1\_work\2\s\output\AvoidPSPathOverlap'                                      Module Manifest Path (src) = 'C:\BuildWorker1\_work\2\s\source\DscWorkshop.psd1'                                        Module Version             = '0.4'                                                                                                                                                                                                      Generating RSOP output for 6 nodes.                                                                                             Building RSOP for DSCFile01...                                                                                          Building RSOP for DSCWeb01...                                                                                           Building RSOP for DSCFile03...                                                                                          Building RSOP for DSCWeb03...                                                                                           Building RSOP for DSCFile02...                                                                                          Building RSOP for DSCWeb02...                                                                                   Done /build/CompileDatumRsop 00:00:40.2738267                                                                                                                                                                                                   ===============================================================================                                                                 TESTDSCRESOURCES                                                                                                                                                                                                        -------------------------------------------------------------------------------                                           /build/TestDscResources                                                                                                 C:\BuildWorker1\_work\2\s\output\RequiredModules\Sampler.DscPipeline\0.2.0\tasks\TestDscResources.build.ps1:1                                                                                                                                 Not implemented yet. We don't separate Composites from Resources or build dependencies anymore.                         Done /build/TestDscResources 00:00:00.0473411                                                                                                                                                                                                   ===============================================================================                                                                 COMPILEROOTCONFIGURATION                                                                                                                                                                                                -------------------------------------------------------------------------------                                           /build/CompileRootConfiguration                                                                                         C:\BuildWorker1\_work\2\s\output\RequiredModules\Sampler.DscPipeline\0.2.0\tasks\CompileRootConfiguration.build.ps1:44                                                                                                                                Project Name               = 'DscWorkshop'                                                                              Source Path                = 'source'                                                                                   Output Directory           = 'C:\BuildWorker1\_work\2\s\output'                                                         Release Notes path         = 'C:\BuildWorker1\_work\2\s\output\ReleaseNotes.md'                                         Built Module Subdirectory  = 'C:\BuildWorker1\_work\2\s\output\AvoidPSPathOverlap'                                      Module Manifest Path (src) = 'C:\BuildWorker1\_work\2\s\source\DscWorkshop.psd1'                                        Module Version             = '0.4'                                                                                                                                                                                                      Reading DSC Resource metadata for supporting CIM based DSC parameters...                                                Done                                                                                                                    Transcript started, output file is output\Logs\CompileRootConfiguration.log                                                                                                                                                                     Did not find 'RootConfiguration.ps1' and 'CompileRootConfiguration.ps1' in 'source', using the ones in 'Sampler.DscPipeline'                                                                                                                    RootConfiguration will import these composite resource modules as defined in 'build.yaml':                                      - PSDesiredStateConfiguration                                                                                           - DscConfig.Demo                                                                                                                                                                                                                                                                                                                                                ---------------------------------------------------------------------------                                             DSCFile02 : DSCFile02 : MOF__ NA                                                                                            DSCFile02 : FileServer ::> FilesAndFolders .....................................................OK                      DSCFile02 : FileServer ::> RegistryValues ......................................................OK                      DSCFile02 : FileServer ::> SecurityBase ........................................................OK                      DSCFile02 : FileServer ::> WindowsFeatures .....................................................OK                      DSCFile02 : FileServer ::> ComputerSettings ....................................................OK                      DSCFile02 : FileServer ::> NetworkIpConfiguration ..............................................OK                      DSCFile02 : FileServer ::> WindowsEventLogs ....................................................OK                      DSCFile02 : FileServer ::> DscLcmController ....................................................OK                      DSCFile02 : FileServer ::> DscLcmMaintenanceWindows ............................................OK                      DSCFile02 : FileServer ::> DscTagging ..........................................................OK                      DSCFile02 : FileServer ::> DscDiagnostic .......................................................OK                                                                                                                                          ---------------------------------------------------------------------------                                             DSCFile01 : DSCFile01 : MOF__ NA                                                                                            DSCFile01 : FileServer ::> FilesAndFolders .....................................................OK                      DSCFile01 : FileServer ::> RegistryValues ......................................................OK                      DSCFile01 : FileServer ::> SecurityBase ........................................................OK                      DSCFile01 : FileServer ::> WindowsFeatures .....................................................OK                      DSCFile01 : FileServer ::> ComputerSettings ....................................................OK                      DSCFile01 : FileServer ::> NetworkIpConfiguration ..............................................OK                      DSCFile01 : FileServer ::> WindowsEventLogs ....................................................OK                      DSCFile01 : FileServer ::> DscLcmController ....................................................OK                      DSCFile01 : FileServer ::> DscLcmMaintenanceWindows ............................................OK                      DSCFile01 : FileServer ::> DscTagging ..........................................................OK                      DSCFile01 : FileServer ::> DscDiagnostic .......................................................OK                                                                                                                                          ---------------------------------------------------------------------------                                             DSCFile03 : DSCFile03 : MOF__ NA                                                                                            DSCFile03 : FileServer ::> FilesAndFolders .....................................................OK                      DSCFile03 : FileServer ::> RegistryValues ......................................................OK                      DSCFile03 : FileServer ::> SecurityBase ........................................................OK                      DSCFile03 : FileServer ::> WindowsFeatures .....................................................OK                      DSCFile03 : FileServer ::> ComputerSettings ....................................................OK                      DSCFile03 : FileServer ::> NetworkIpConfiguration ..............................................OK                      DSCFile03 : FileServer ::> WindowsEventLogs ....................................................OK                      DSCFile03 : FileServer ::> DscLcmController ....................................................OK                      DSCFile03 : FileServer ::> DscLcmMaintenanceWindows ............................................OK                      DSCFile03 : FileServer ::> DscTagging ..........................................................OK                      DSCFile03 : FileServer ::> DscDiagnostic .......................................................OK                                                                                                                                          ---------------------------------------------------------------------------                                             DSCWeb03 : DSCWeb03 : MOF__ NA                                                                                              DSCWeb03 : WebServer ::> FilesAndFolders .......................................................OK                      DSCWeb03 : WebServer ::> WindowsServices .......................................................OK                      DSCWeb03 : WebServer ::> RegistryValues ........................................................OK                      DSCWeb03 : WebServer ::> WebApplicationPools ...................................................OK                      DSCWeb03 : WebServer ::> WebApplications .......................................................OK                      DSCWeb03 : WebServer ::> SecurityBase ..........................................................OK                      DSCWeb03 : WebServer ::> WindowsFeatures .......................................................OK                      DSCWeb03 : WebServer ::> ComputerSettings ......................................................OK                      DSCWeb03 : WebServer ::> NetworkIpConfiguration ................................................OK                      DSCWeb03 : WebServer ::> WindowsEventLogs ......................................................OK                      DSCWeb03 : WebServer ::> DscLcmController ......................................................OK                      DSCWeb03 : WebServer ::> DscLcmMaintenanceWindows ..............................................OK                      DSCWeb03 : WebServer ::> DscTagging ............................................................OK                      DSCWeb03 : WebServer ::> DscDiagnostic .........................................................OK                                                                                                                                          ---------------------------------------------------------------------------                                             DSCWeb01 : DSCWeb01 : MOF__ NA                                                                                              DSCWeb01 : WebServer ::> FilesAndFolders .......................................................OK                      DSCWeb01 : WebServer ::> WindowsServices .......................................................OK                      DSCWeb01 : WebServer ::> RegistryValues ........................................................OK                      DSCWeb01 : WebServer ::> WebApplicationPools ...................................................OK                      DSCWeb01 : WebServer ::> WebApplications .......................................................OK                      DSCWeb01 : WebServer ::> SecurityBase ..........................................................OK                      DSCWeb01 : WebServer ::> WindowsFeatures .......................................................OK                      DSCWeb01 : WebServer ::> ComputerSettings ......................................................OK                      DSCWeb01 : WebServer ::> NetworkIpConfiguration ................................................OK                      DSCWeb01 : WebServer ::> WindowsEventLogs ......................................................OK                      DSCWeb01 : WebServer ::> DscLcmController ......................................................OK                      DSCWeb01 : WebServer ::> DscLcmMaintenanceWindows ..............................................OK                      DSCWeb01 : WebServer ::> DscTagging ............................................................OK                      DSCWeb01 : WebServer ::> DscDiagnostic .........................................................OK                                                                                                                                          ---------------------------------------------------------------------------                                             DSCWeb02 : DSCWeb02 : MOF__ NA                                                                                              DSCWeb02 : WebServer ::> FilesAndFolders .......................................................OK                      DSCWeb02 : WebServer ::> WindowsServices .......................................................OK                      DSCWeb02 : WebServer ::> RegistryValues ........................................................OK                      DSCWeb02 : WebServer ::> WebApplicationPools ...................................................OK                      DSCWeb02 : WebServer ::> WebApplications .......................................................OK                      DSCWeb02 : WebServer ::> SecurityBase ..........................................................OK                      DSCWeb02 : WebServer ::> WindowsFeatures .......................................................OK                      DSCWeb02 : WebServer ::> ComputerSettings ......................................................OK                      DSCWeb02 : WebServer ::> NetworkIpConfiguration ................................................OK
    DSCWeb02 : WebServer ::> WindowsEventLogs ......................................................OK
    DSCWeb02 : WebServer ::> DscLcmController ......................................................OK
    DSCWeb02 : WebServer ::> DscLcmMaintenanceWindows ..............................................OK
    DSCWeb02 : WebServer ::> DscTagging ............................................................OK
    DSCWeb02 : WebServer ::> DscDiagnostic .........................................................OK
Successfully compiled 6 MOF files
Transcript stopped, output file is C:\BuildWorker1\_work\2\s\output\Logs\CompileRootConfiguration.log
Done /build/CompileRootConfiguration 00:01:32.0067586

===============================================================================
                        COMPILEROOTMETAMOF

-------------------------------------------------------------------------------
  /build/CompileRootMetaMof
  C:\BuildWorker1\_work\2\s\output\RequiredModules\Sampler.DscPipeline\0.2.0\tasks\CompileRootMetaMof.build.ps1:32

        Project Name               = 'DscWorkshop'
        Source Path                = 'source'
        Output Directory           = 'C:\BuildWorker1\_work\2\s\output'
        Release Notes path         = 'C:\BuildWorker1\_work\2\s\output\ReleaseNotes.md'
        Built Module Subdirectory  = 'C:\BuildWorker1\_work\2\s\output\AvoidPSPathOverlap'
        Module Manifest Path (src) = 'C:\BuildWorker1\_work\2\s\source\DscWorkshop.psd1'
        Module Version             = '0.4'


Did not find 'RootMetaMof.ps1' in 'source', using 'RootMetaMof.ps1' the one in module 'Sampler.DscPipeline'
Successfully compiled 6 Meta MOF files.
Successfully compiled 6 Meta MOF files.
Done /build/CompileRootMetaMof 00:00:01.7743789
Done /build 00:02:40.4770578
Build succeeded. 9 tasks, 0 errors, 0 warnings 00:02:46.0891300

How to reproduce

Clone DscWorkshop project and deploy the hyper-v lab using the scripts in the Lab folder of the project.
In AzureDevops, when I try run the DscWorkshop pipeline, it fails with the error detailed above.

Expected behavior

Pipeline complete building the artifacts

Current behavior

Pipeline fails at build dsc artifacts step.

Suggested solution

I don't have one.

Operating system the target node is running

OsName               : Microsoft Windows Server 2022 Datacenter Evaluation
OsOperatingSystemSKU : 80
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

PS C:\Users\Install.contoso> $PSVersionTable

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

Module version used

N/A

RSOP vs MOF

Problem description

I added a few modules to my clone, and the build succeeds both locally and in the Azure pipeline.

The RSOP looks like this:

WindowsFeatures:
  Names:
  - +RSAT                                                                                             Roles\MGMTServer
  - -Telnet-Client                                                                                  Baselines\Security
Description: MGMTServer in Test                                                           AllNodes\Test\dev-tst-dsc-01
FirewallRules:
  Rules:
  - Description: Allow WinRM incomming traffic on domain/private conntections                     Baselines\Security
    Enabled: True                                                                                 Baselines\Security
    Profile:
    - Domain                                                                                      Baselines\Security
    - Private                                                                                     Baselines\Security
    Direction: Inbound                                                                            Baselines\Security
    Name: WinRMHTTPInDomainRule                                                                   Baselines\Security
    RemotePort: Any                                                                               Baselines\Security
    Action: Allow                                                                                 Baselines\Security
    DisplayName: WinRMHTTPInDomainRule                                                            Baselines\Security
    Protocol: Any                                                                                 Baselines\Security
    LocalPort: 5985                                                                               Baselines\Security
  - Description: Allow WinRM incomming traffic on public connections                              Baselines\Security
    Enabled: True                                                                                 Baselines\Security
    Profile: Public                                                                               Baselines\Security
    Direction: Inbound                                                                            Baselines\Security
    Name: WinRMHTTPInPublicRule                                                                   Baselines\Security
    RemotePort: Any                                                                               Baselines\Security
    Action: Allow                                                                                 Baselines\Security
    DisplayName: WinRMHTTPInPublicRule                                                            Baselines\Security
    Protocol: Any                                                                                 Baselines\Security
    LocalPort: 5985                                                                               Baselines\Security
Name: dev-tst-dsc-01
DscLcmController:
  MonitorInterval: 00:15:00                                                                           Baselines\DscLcm
  SendDscTaggingData: True                                                                            Baselines\DscLcm
  AutoCorrectInterval: 00:30:00                                                                       Baselines\DscLcm
  MaintenanceWindowMode: AutoCorrect                                                                  Baselines\DscLcm
  RefreshIntervalOverride: False                                                                      Baselines\DscLcm
  MaintenanceWindowOverride: False                                                                    Baselines\DscLcm
  ControllerInterval: 00:05:00                                                                        Baselines\DscLcm
  RefreshInterval: 00:30:00                                                                           Baselines\DscLcm
  MaxLcmRuntime: 00:30:00                                                                             Baselines\DscLcm
  LogHistoryTimeSpan: 7.00:00:00                                                                      Baselines\DscLcm
  WriteTranscripts: True                                                                              Baselines\DscLcm
  AutoCorrectIntervalOverride: False                                                                  Baselines\DscLcm
PSDscAllowPlainTextPassword: True                                                         AllNodes\Test\dev-tst-dsc-01
PSDscAllowDomainUser: True                                                                AllNodes\Test\dev-tst-dsc-01
ComputerSettings:
  Description: MGMTServer in Test                                                         AllNodes\Test\dev-tst-dsc-01
  Name: dev-tst-dsc-01                                                                    AllNodes\Test\dev-tst-dsc-01
  TimeZone: Greenwich Standard Time
DscLcmMaintenanceWindows:
  MaintenanceWindows:
    Name: Always                                                                                      Baselines\DscLcm
    StartTime: 00:00:00                                                                               Baselines\DscLcm
    Timespan: 24:00:00                                                                                Baselines\DscLcm
  DependsOn: '[DscLcmController]DscLcmController                                                       Baselines\DscLcm'
Configurations:
- WindowsFeatures                                                                                     Roles\MGMTServer
- SecurityBase                                                                                      Baselines\Security
- RegistryValues                                                                                    Baselines\Security
- FirewallRules                                                                                     Baselines\Security
- ComputerSettings                                                                                    Baselines\Server
- WindowsEventLogs                                                                                    Baselines\Server
- Chocolatey                                                                                          Baselines\Server
- DscLcmController                                                                                    Baselines\DscLcm
- DscLcmMaintenanceWindows                                                                            Baselines\DscLcm
- DscTagging                                                                                          Baselines\DscLcm
- DscDiagnostic                                                                                       Baselines\DscLcm
SecurityBase:
  DependsOn: '[WindowsFeatures]WindowsFeatures                                                       Baselines\Security'
  Role: Baseline                                                                                    Baselines\Security
Baseline: Server                                                                          AllNodes\Test\dev-tst-dsc-01
DscTagging:
  Environment: Test
  Version: 0.3.0
  Layers:
  - AllNodes\Test\dev-tst-dsc-01                                                          AllNodes\Test\dev-tst-dsc-01
  - Environment\Test                                                                      AllNodes\Test\dev-tst-dsc-01
  - Baselines\Security                                                                    AllNodes\Test\dev-tst-dsc-01
  - Baselines\Server                                                                      AllNodes\Test\dev-tst-dsc-01
  - Baselines\DscLcm                                                                      AllNodes\Test\dev-tst-dsc-01
Chocolatey:
  chocoFolder: C:\choco                                                                               Baselines\Server
DscDiagnostic: {}
WindowsEventLogs:
  Logs:
  - LogMode: Circular                                                                               Baselines\Server
    IsEnabled: True                                                                                 Baselines\Server
    LogName: System                                                                                 Baselines\Server
    MaximumSizeInBytes: 20971520                                                                    Baselines\Server
  - LogMode: Circular                                                                               Baselines\Server
    IsEnabled: True                                                                                 Baselines\Server
    LogName: Application                                                                            Baselines\Server
    MaximumSizeInBytes: 20971520                                                                    Baselines\Server
  - LogMode: Circular                                                                               Baselines\Server
    IsEnabled: True                                                                                 Baselines\Server
    LogName: Security                                                                               Baselines\Server
    MaximumSizeInBytes: 134217728                                                                   Baselines\Server
  DependsOn: '[ComputerSettings]ComputerSettings                                                       Baselines\Server'
NodeName: dev-tst-dsc-01                                                                  AllNodes\Test\dev-tst-dsc-01
Environment: Test                                                                         AllNodes\Test\dev-tst-dsc-01
LcmConfig:
  ConfigurationRepositoryWeb:
    Server:
      ConfigurationNames: dev-tst-dsc-01                                                  AllNodes\Test\dev-tst-dsc-01
      RegistrationKey: ec717ee9-b343-49ee-98a2-26e53939eecf
      ServerURL: https://dscpull01.contoso.com:8080/PSDSCPullServer.svc
  ReportServerWeb:
    RegistrationKey: ec717ee9-b343-49ee-98a2-26e53939eecf                                             Baselines\DscLcm
    ServerURL: https://dscpull01.contoso.com:8080/PSDSCPullServer.svc                                 Baselines\DscLcm
  Settings:
    RefreshFrequencyMins: 30                                                                          Baselines\DscLcm
    AllowModuleOverwrite: True                                                                        Baselines\DscLcm
    ActionAfterReboot: ContinueConfiguration                                                          Baselines\DscLcm
    RefreshMode: Pull                                                                                 Baselines\DscLcm
    RebootNodeIfNeeded: True                                                                          Baselines\DscLcm
    ConfigurationMode: ApplyAndMonitor                                                                Baselines\DscLcm
    ConfigurationModeFrequencyMins: 30                                                                Baselines\DscLcm
RegistryValues:
  Values:
  - Key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2Baselines\Security
    Ensure: Present                                                                               Baselines\Security
  - Key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\ClientBaselines\Security
    Ensure: Present                                                                               Baselines\Security
  - Key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\ServerBaselines\Security
    Ensure: Present                                                                               Baselines\Security
  - ValueName: AllowBasic                                                                         Baselines\Security
    ValueType: Dword                                                                              Baselines\Security
    Key: HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\WinRM\Client                      Baselines\Security
    ValueData: 0                                                                                  Baselines\Security
  - ValueName: AllowBasic                                                                         Baselines\Security
    ValueType: Dword                                                                              Baselines\Security
    Key: HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\WinRM\Client\Service              Baselines\Security
    ValueData: 0                                                                                  Baselines\Security
  - ValueName: DoNotPopWACConsoleAtSMLaunch                                                         Baselines\Server
    ValueType: Dword                                                                                Baselines\Server
    Key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ServerManager\DisableWindowsAdminCenterPrompt        Baselines\Server
    ValueData: 1                                                                                    Baselines\Server
Role: MGMTServer                                                                          AllNodes\Test\dev-tst-dsc-01

By looking at this I assumed it will apply the firewall changes and registry changes. The node is appearing compliant in AZ automation.

But the actual resultant config does not contains those:

PS C:\Windows\system32> Get-DSCConfiguration 


ConfigurationName    : RootConfiguration
DependsOn            : 
ModuleName           : PSDesiredStateConfiguration
ModuleVersion        : 1.1
PsDscRunAsCredential : 
ResourceId           : [WindowsFeature]RSAT::[WindowsFeatures]WindowsFeatures
SourceInfo           : 
Credential           : 
DisplayName          : Remote Server Administration Tools
Ensure               : Present
IncludeAllSubFeature : True
LogPath              : 
Name                 : RSAT
Source               : 
PSComputerName       : 
CimClassName         : MSFT_RoleResource

ConfigurationName    : RootConfiguration
DependsOn            : 
ModuleName           : PSDesiredStateConfiguration
ModuleVersion        : 1.1
PsDscRunAsCredential : 
ResourceId           : [WindowsFeature]Telnet-Client::[WindowsFeatures]WindowsFeatures
SourceInfo           : 
Credential           : 
DisplayName          : Telnet Client
Ensure               : Absent
IncludeAllSubFeature : False
LogPath              : 
Name                 : Telnet-Client
Source               : 
PSComputerName       : 
CimClassName         : MSFT_RoleResource

ConfigurationName    : RootConfiguration
DependsOn            : {[WindowsFeature]RSAT::[WindowsFeatures]WindowsFeatures, [WindowsFeature]Telnet-Client::[WindowsFeatures]WindowsFeatures}
ModuleName           : xPSDesiredStateConfiguration
ModuleVersion        : 9.1.0
PsDscRunAsCredential : 
ResourceId           : [xWindowsFeature]DisableSmbV1::[SecurityBase]SecurityBase
SourceInfo           : 
Credential           : 
DisplayName          : SMB 1.0/CIFS File Sharing Support
Ensure               : Absent
IncludeAllSubFeature : False
LogPath              : 
Name                 : FS-SMB1
PSComputerName       : 
CimClassName         : DSC_xWindowsFeature

ConfigurationName    : RootConfiguration
DependsOn            : {[WindowsFeature]RSAT::[WindowsFeatures]WindowsFeatures, [WindowsFeature]Telnet-Client::[WindowsFeatures]WindowsFeatures}
ModuleName           : ComputerManagementDsc
ModuleVersion        : 8.5.0
PsDscRunAsCredential : 
ResourceId           : [PowerShellExecutionPolicy]ExecutionPolicyAllSigned::[SecurityBase]SecurityBase
SourceInfo           : 
ExecutionPolicy      : RemoteSigned
ExecutionPolicyScope : LocalMachine
PSComputerName       : 
CimClassName         : DSC_PowerShellExecutionPolicy

ConfigurationName    : RootConfiguration
DependsOn            : {[WindowsFeature]RSAT::[WindowsFeatures]WindowsFeatures, [WindowsFeature]Telnet-Client::[WindowsFeatures]WindowsFeatures}
ModuleName           : SecurityPolicyDsc
ModuleVersion        : 2.10.0.0
PsDscRunAsCredential : 
ResourceId           : [UserRightsAssignment]DenyLogonLocallyForAdministrator::[SecurityBase]SecurityBase
SourceInfo           : 
Ensure               : 
Force                : 
Identity             : 
Policy               : Deny_log_on_locally
PSComputerName       : 
CimClassName         : MSFT_UserRightsAssignment

ConfigurationName    : RootConfiguration
DependsOn            : {[WindowsFeature]RSAT::[WindowsFeatures]WindowsFeatures, [WindowsFeature]Telnet-Client::[WindowsFeatures]WindowsFeatures}
ModuleName           : SecurityPolicyDsc
ModuleVersion        : 2.10.0.0
PsDscRunAsCredential : 
ResourceId           : [UserRightsAssignment]AllowLogonLocally::[SecurityBase]SecurityBase
SourceInfo           : 
Ensure               : 
Force                : 
Identity             : {BUILTIN\Administrators, BUILTIN\Users, BUILTIN\Backup Operators}
Policy               : Allow_log_on_locally
PSComputerName       : 
CimClassName         : MSFT_UserRightsAssignment

ConfigurationName    : RootConfiguration
DependsOn            : 
ModuleName           : ComputerManagementDsc
ModuleVersion        : 8.5.0
PsDscRunAsCredential : 
ResourceId           : [Computer]Computerdev-tst-dsc-01::[ComputerSettings]ComputerSettings
SourceInfo           : 
Credential           : MSFT_Credential
CurrentOU            : CN=Computers,DC=ablnonprod,DC=local
Description          : MGMTServer in Test
DomainName           : ablnonprod.local
JoinOU               : 
Name                 : dev-tst-dsc-01
Server               : 
UnjoinCredential     : MSFT_Credential
WorkGroupName        : 
PSComputerName       : 
CimClassName         : DSC_Computer

ConfigurationName    : RootConfiguration
DependsOn            : 
ModuleName           : ComputerManagementDsc
ModuleVersion        : 8.5.0
PsDscRunAsCredential : 
ResourceId           : [TimeZone]TimeZone::[ComputerSettings]ComputerSettings
SourceInfo           : 
IsSingleInstance     : Yes
TimeZone             : Greenwich Standard Time
PSComputerName       : 
CimClassName         : DSC_TimeZone

ConfigurationName     : RootConfiguration
DependsOn             : {[Computer]Computerdev-tst-dsc-01::[ComputerSettings]ComputerSettings, [TimeZone]TimeZone::[ComputerSettings]ComputerSettings}
ModuleName            : ComputerManagementDsc
ModuleVersion         : 8.5.0
PsDscRunAsCredential  : 
ResourceId            : [WindowsEventLog]System::[WindowsEventLogs]WindowsEventLogs
SourceInfo            : 
CategoryResourceFile  : 
IsEnabled             : True
LogFilePath           : %SystemRoot%\System32\Winevt\Logs\System.evtx
LogMode               : Circular
LogName               : System
LogRetentionDays      : 0
MaximumSizeInBytes    : 20971520
MessageResourceFile   : 
ParameterResourceFile : 
RegisteredSource      : 
RestrictGuestAccess   : True
SecurityDescriptor    : O:BAG:SYD:(A;;0xf0007;;;SY)(A;;0x7;;;BA)(A;;0x3;;;BO)(A;;0x5;;;SO)(A;;0x1;;;IU)(A;;0x3;;;SU)(A;;0x1;;;S-1-5-3)(A;;0x2;;;S-1-5-33)(A;;0x1;;;S-1-5-32-573)
PSComputerName        : 
CimClassName          : DSC_WindowsEventLog

ConfigurationName     : RootConfiguration
DependsOn             : {[Computer]Computerdev-tst-dsc-01::[ComputerSettings]ComputerSettings, [TimeZone]TimeZone::[ComputerSettings]ComputerSettings}
ModuleName            : ComputerManagementDsc
ModuleVersion         : 8.5.0
PsDscRunAsCredential  : 
ResourceId            : [WindowsEventLog]Application::[WindowsEventLogs]WindowsEventLogs
SourceInfo            : 
CategoryResourceFile  : 
IsEnabled             : True
LogFilePath           : %SystemRoot%\System32\Winevt\Logs\Application.evtx
LogMode               : Circular
LogName               : Application
LogRetentionDays      : 0
MaximumSizeInBytes    : 20971520
MessageResourceFile   : 
ParameterResourceFile : 
RegisteredSource      : 
RestrictGuestAccess   : True
SecurityDescriptor    : O:BAG:SYD:(A;;0x2;;;S-1-15-2-1)(A;;0xf0007;;;SY)(A;;0x7;;;BA)(A;;0x7;;;SO)(A;;0x3;;;IU)(A;;0x3;;;SU)(A;;0x3;;;S-1-5-3)(A;;0x3;;;S-1-5-33)(A;;0x1;;;S-1-5-32-573)
PSComputerName        : 
CimClassName          : DSC_WindowsEventLog

ConfigurationName     : RootConfiguration
DependsOn             : {[Computer]Computerdev-tst-dsc-01::[ComputerSettings]ComputerSettings, [TimeZone]TimeZone::[ComputerSettings]ComputerSettings}
ModuleName            : ComputerManagementDsc
ModuleVersion         : 8.5.0
PsDscRunAsCredential  : 
ResourceId            : [WindowsEventLog]Security::[WindowsEventLogs]WindowsEventLogs
SourceInfo            : 
CategoryResourceFile  : 
IsEnabled             : True
LogFilePath           : %SystemRoot%\System32\Winevt\Logs\Security.evtx
LogMode               : Circular
LogName               : Security
LogRetentionDays      : 0
MaximumSizeInBytes    : 134217728
MessageResourceFile   : 
ParameterResourceFile : 
RegisteredSource      : 
RestrictGuestAccess   : True
SecurityDescriptor    : O:BAG:SYD:(A;;0xf0005;;;SY)(A;;0x5;;;BA)(A;;0x1;;;S-1-5-32-573)
PSComputerName        : 
CimClassName          : DSC_WindowsEventLog

ConfigurationName    : RootConfiguration
DependsOn            : 
ModuleName           : xPSDesiredStateConfiguration
ModuleVersion        : 9.1.0
PsDscRunAsCredential : 
ResourceId           : [xRegistry]DscLcmController_MaintenanceWindowMode::[DscLcmController]DscLcmController
SourceInfo           : 
Ensure               : Present
Force                : 
Hex                  : 
key                  : HKEY_LOCAL_MACHINE\SOFTWARE\DscLcmController
ValueData            : {AutoCorrect}
ValueName            : MaintenanceWindowMode
ValueType            : String
PSComputerName       : 
CimClassName         : DSC_xRegistryResource

ConfigurationName    : RootConfiguration
DependsOn            : 
ModuleName           : xPSDesiredStateConfiguration
ModuleVersion        : 9.1.0
PsDscRunAsCredential : 
ResourceId           : [xRegistry]DscLcmController_MonitorInterval::[DscLcmController]DscLcmController
SourceInfo           : 
Ensure               : Present
Force                : 
Hex                  : 
key                  : HKEY_LOCAL_MACHINE\SOFTWARE\DscLcmController
ValueData            : {00:15:00}
ValueName            : MonitorInterval
ValueType            : String
PSComputerName       : 
CimClassName         : DSC_xRegistryResource

ConfigurationName    : RootConfiguration
DependsOn            : 
ModuleName           : xPSDesiredStateConfiguration
ModuleVersion        : 9.1.0
PsDscRunAsCredential : 
ResourceId           : [xRegistry]DscLcmController_AutoCorrectInterval::[DscLcmController]DscLcmController
SourceInfo           : 
Ensure               : Present
Force                : 
Hex                  : 
key                  : HKEY_LOCAL_MACHINE\SOFTWARE\DscLcmController
ValueData            : {00:30:00}
ValueName            : AutoCorrectInterval
ValueType            : String
PSComputerName       : 
CimClassName         : DSC_xRegistryResource

ConfigurationName    : RootConfiguration
DependsOn            : 
ModuleName           : xPSDesiredStateConfiguration
ModuleVersion        : 9.1.0
PsDscRunAsCredential : 
ResourceId           : [xRegistry]DscLcmController_AutoCorrectIntervalOverride::[DscLcmController]DscLcmController
SourceInfo           : 
Ensure               : Present
Force                : 
Hex                  : 
key                  : HKEY_LOCAL_MACHINE\SOFTWARE\DscLcmController
ValueData            : {0}
ValueName            : AutoCorrectIntervalOverride
ValueType            : DWord
PSComputerName       : 
CimClassName         : DSC_xRegistryResource

ConfigurationName    : RootConfiguration
DependsOn            : 
ModuleName           : xPSDesiredStateConfiguration
ModuleVersion        : 9.1.0
PsDscRunAsCredential : 
ResourceId           : [xRegistry]DscLcmController_RefreshInterval::[DscLcmController]DscLcmController
SourceInfo           : 
Ensure               : Present
Force                : 
Hex                  : 
key                  : HKEY_LOCAL_MACHINE\SOFTWARE\DscLcmController
ValueData            : {00:30:00}
ValueName            : RefreshInterval
ValueType            : String
PSComputerName       : 
CimClassName         : DSC_xRegistryResource

ConfigurationName    : RootConfiguration
DependsOn            : 
ModuleName           : xPSDesiredStateConfiguration
ModuleVersion        : 9.1.0
PsDscRunAsCredential : 
ResourceId           : [xRegistry]DscLcmController_RefreshIntervalOverride::[DscLcmController]DscLcmController
SourceInfo           : 
Ensure               : Present
Force                : 
Hex                  : 
key                  : HKEY_LOCAL_MACHINE\SOFTWARE\DscLcmController
ValueData            : {0}
ValueName            : RefreshIntervalOverride
ValueType            : DWord
PSComputerName       : 
CimClassName         : DSC_xRegistryResource

ConfigurationName    : RootConfiguration
DependsOn            : 
ModuleName           : xPSDesiredStateConfiguration
ModuleVersion        : 9.1.0
PsDscRunAsCredential : 
ResourceId           : [xRegistry]DscLcmController_ControllerInterval::[DscLcmController]DscLcmController
SourceInfo           : 
Ensure               : Present
Force                : 
Hex                  : 
key                  : HKEY_LOCAL_MACHINE\SOFTWARE\DscLcmController
ValueData            : {00:05:00}
ValueName            : ControllerInterval
ValueType            : String
PSComputerName       : 
CimClassName         : DSC_xRegistryResource

ConfigurationName    : RootConfiguration
DependsOn            : 
ModuleName           : xPSDesiredStateConfiguration
ModuleVersion        : 9.1.0
PsDscRunAsCredential : 
ResourceId           : [xRegistry]DscLcmController_MaintenanceWindowOverride::[DscLcmController]DscLcmController
SourceInfo           : 
Ensure               : Present
Force                : 
Hex                  : 
key                  : HKEY_LOCAL_MACHINE\SOFTWARE\DscLcmController
ValueData            : {0}
ValueName            : MaintenanceWindowOverride
ValueType            : DWord
PSComputerName       : 
CimClassName         : DSC_xRegistryResource

ConfigurationName    : RootConfiguration
DependsOn            : 
ModuleName           : xPSDesiredStateConfiguration
ModuleVersion        : 9.1.0
PsDscRunAsCredential : 
ResourceId           : [xRegistry]DscLcmController_WriteTranscripts::[DscLcmController]DscLcmController
SourceInfo           : 
Ensure               : Present
Force                : 
Hex                  : 
key                  : HKEY_LOCAL_MACHINE\SOFTWARE\DscLcmController
ValueData            : {1}
ValueName            : WriteTranscripts
ValueType            : DWord
PSComputerName       : 
CimClassName         : DSC_xRegistryResource

ConfigurationName    : RootConfiguration
DependsOn            : 
ModuleName           : xPSDesiredStateConfiguration
ModuleVersion        : 9.1.0
PsDscRunAsCredential : 
ResourceId           : [xRegistry]DscLcmController_MaxLcmRuntime::[DscLcmController]DscLcmController
SourceInfo           : 
Ensure               : Present
Force                : 
Hex                  : 
key                  : HKEY_LOCAL_MACHINE\SOFTWARE\DscLcmController
ValueData            : {00:30:00}
ValueName            : MaxLcmRuntime
ValueType            : String
PSComputerName       : 
CimClassName         : DSC_xRegistryResource

ConfigurationName    : RootConfiguration
DependsOn            : 
ModuleName           : xPSDesiredStateConfiguration
ModuleVersion        : 9.1.0
PsDscRunAsCredential : 
ResourceId           : [xRegistry]DscLcmController_LogHistoryTimeSpan::[DscLcmController]DscLcmController
SourceInfo           : 
Ensure               : Present
Force                : 
Hex                  : 
key                  : HKEY_LOCAL_MACHINE\SOFTWARE\DscLcmController
ValueData            : {7.00:00:00}
ValueName            : LogHistoryTimeSpan
ValueType            : String
PSComputerName       : 
CimClassName         : DSC_xRegistryResource

ConfigurationName    : RootConfiguration
DependsOn            : 
ModuleName           : xPSDesiredStateConfiguration
ModuleVersion        : 9.1.0
PsDscRunAsCredential : 
ResourceId           : [xRegistry]DscLcmController_SendDscTaggingData::[DscLcmController]DscLcmController
SourceInfo           : 
Ensure               : Present
Force                : 
Hex                  : 
key                  : HKEY_LOCAL_MACHINE\SOFTWARE\DscLcmController
ValueData            : {1}
ValueName            : SendDscTaggingData
ValueType            : DWord
PSComputerName       : 
CimClassName         : DSC_xRegistryResource

ConfigurationName    : RootConfiguration
DependsOn            : 
ModuleName           : PSDesiredStateConfiguration
ModuleVersion        : 
PsDscRunAsCredential : 
ResourceId           : [File]DscLcmControllerScript::[DscLcmController]DscLcmController
SourceInfo           : 
Attributes           : {archive, notcontentindexed}
Checksum             : 
Contents             : 
CreatedDate          : 04/11/2022 12:57:18
Credential           : 
DestinationPath      : C:\ProgramData\Dsc\LcmController\LcmController.ps1
Ensure               : present
Force                : 
MatchSource          : 
ModifiedDate         : 04/11/2022 12:57:18
Recurse              : 
Size                 : 24798
SourcePath           : 
SubItems             : 
Type                 : file
PSComputerName       : 
CimClassName         : MSFT_FileDirectoryConfiguration

ConfigurationName               : RootConfiguration
DependsOn                       : {[File]DscLcmControllerScript::[DscLcmController]DscLcmController}
ModuleName                      : ComputerManagementDsc
ModuleVersion                   : 8.5.0
PsDscRunAsCredential            : 
ResourceId                      : [ScheduledTask]DscControllerTask::[DscLcmController]DscLcmController
SourceInfo                      : 
ActionArguments                 : -File C:\ProgramData\Dsc\LcmController\LcmController.ps1
ActionExecutable                : C:\windows\system32\WindowsPowerShell\v1.0\powershell.exe
ActionWorkingPath               : 
AllowStartIfOnBatteries         : False
BuiltInAccount                  : NT AUTHORITY\SYSTEM
Compatibility                   : Win7
DaysInterval                    : 0
DaysOfWeek                      : {}
Delay                           : 00:00:00
Description                     : 
DisallowDemandStart             : False
DisallowHardTerminate           : False
DisallowStartOnRemoteAppSession : False
DontStopIfGoingOnBatteries      : False
DontStopOnIdleEnd               : False
Enable                          : True
Ensure                          : Present
EventSubscription               : 
ExecuteAsCredential             : MSFT_Credential
ExecuteAsGMSA                   : SYSTEM
ExecutionTimeLimit              : 3.00:00:00
Hidden                          : False
IdleDuration                    : 01:00:00
IdleWaitTimeout                 : 02:00:00
LogonType                       : ServiceAccount
MultipleInstances               : Queue
NetworkName                     : 
Priority                        : 7
RandomDelay                     : 00:00:00
RepeatInterval                  : 00:05:00
RepetitionDuration              : Indefinitely
RestartCount                    : 0
RestartInterval                 : 00:00:00
RestartOnIdle                   : False
RunLevel                        : Limited
RunOnlyIfIdle                   : False
RunOnlyIfNetworkAvailable       : False
ScheduleType                    : Once
StartTime                       : 01/11/2022 14:14:04
StartWhenAvailable              : False
SynchronizeAcrossTimeZone       : False
TaskName                        : DscLcmController
TaskPath                        : \DscController\
User                            : SYSTEM
WakeToRun                       : False
WeeksInterval                   : 0
PSComputerName                  : 
CimClassName                    : DSC_ScheduledTask

ConfigurationName    : RootConfiguration
DependsOn            : {[xRegistry]DscLcmController_MaintenanceWindowMode::[DscLcmController]DscLcmController, [xRegistry]DscLcmController_MonitorInterval::[DscLcmController]DscLcmController, 
                       [xRegistry]DscLcmController_AutoCorrectInterval::[DscLcmController]DscLcmController, [xRegistry]DscLcmController_AutoCorrectIntervalOverride::[DscLcmController]DscLcmController...}
ModuleName           : PSDesiredStateConfiguration
ModuleVersion        : 1.1
PsDscRunAsCredential : 
ResourceId           : [Script]MaintenanceWindowsCheck::[DscLcmMaintenanceWindows]DscLcmMaintenanceWindows
SourceInfo           : 
Credential           : 
GetScript            : 
Result               : Always
SetScript            : 
TestScript           : 
PSComputerName       : 
CimClassName         : MSFT_ScriptResource

ConfigurationName    : RootConfiguration
DependsOn            : {[xRegistry]DscLcmController_MaintenanceWindowMode::[DscLcmController]DscLcmController, [xRegistry]DscLcmController_MonitorInterval::[DscLcmController]DscLcmController, 
                       [xRegistry]DscLcmController_AutoCorrectInterval::[DscLcmController]DscLcmController, [xRegistry]DscLcmController_AutoCorrectIntervalOverride::[DscLcmController]DscLcmController...}
ModuleName           : xPSDesiredStateConfiguration
ModuleVersion        : 9.1.0
PsDscRunAsCredential : 
ResourceId           : [xRegistry]StartTime_Always::[DscLcmMaintenanceWindows]DscLcmMaintenanceWindows
SourceInfo           : 
Ensure               : Present
Force                : 
Hex                  : 
key                  : HKEY_LOCAL_MACHINE\SOFTWARE\DscLcmController\MaintenanceWindows\Always
ValueData            : {00:00:00}
ValueName            : StartTime
ValueType            : String
PSComputerName       : 
CimClassName         : DSC_xRegistryResource

ConfigurationName    : RootConfiguration
DependsOn            : {[xRegistry]DscLcmController_MaintenanceWindowMode::[DscLcmController]DscLcmController, [xRegistry]DscLcmController_MonitorInterval::[DscLcmController]DscLcmController, 
                       [xRegistry]DscLcmController_AutoCorrectInterval::[DscLcmController]DscLcmController, [xRegistry]DscLcmController_AutoCorrectIntervalOverride::[DscLcmController]DscLcmController...}
ModuleName           : xPSDesiredStateConfiguration
ModuleVersion        : 9.1.0
PsDscRunAsCredential : 
ResourceId           : [xRegistry]Timespan_Always::[DscLcmMaintenanceWindows]DscLcmMaintenanceWindows
SourceInfo           : 
Ensure               : Present
Force                : 
Hex                  : 
key                  : HKEY_LOCAL_MACHINE\SOFTWARE\DscLcmController\MaintenanceWindows\Always
ValueData            : {24:00:00}
ValueName            : Timespan
ValueType            : String
PSComputerName       : 
CimClassName         : DSC_xRegistryResource

ConfigurationName    : RootConfiguration
DependsOn            : {[xRegistry]DscLcmController_MaintenanceWindowMode::[DscLcmController]DscLcmController, [xRegistry]DscLcmController_MonitorInterval::[DscLcmController]DscLcmController, 
                       [xRegistry]DscLcmController_AutoCorrectInterval::[DscLcmController]DscLcmController, [xRegistry]DscLcmController_AutoCorrectIntervalOverride::[DscLcmController]DscLcmController...}
ModuleName           : xPSDesiredStateConfiguration
ModuleVersion        : 9.1.0
PsDscRunAsCredential : 
ResourceId           : [xRegistry]DayOfWeek_Always::[DscLcmMaintenanceWindows]DscLcmMaintenanceWindows
SourceInfo           : 
Ensure               : Present
Force                : 
Hex                  : 
key                  : HKEY_LOCAL_MACHINE\SOFTWARE\DscLcmController\MaintenanceWindows\Always
ValueData            : {}
ValueName            : DayOfWeek
ValueType            : String
PSComputerName       : 
CimClassName         : DSC_xRegistryResource

ConfigurationName    : RootConfiguration
DependsOn            : {[xRegistry]DscLcmController_MaintenanceWindowMode::[DscLcmController]DscLcmController, [xRegistry]DscLcmController_MonitorInterval::[DscLcmController]DscLcmController, 
                       [xRegistry]DscLcmController_AutoCorrectInterval::[DscLcmController]DscLcmController, [xRegistry]DscLcmController_AutoCorrectIntervalOverride::[DscLcmController]DscLcmController...}
ModuleName           : xPSDesiredStateConfiguration
ModuleVersion        : 9.1.0
PsDscRunAsCredential : 
ResourceId           : [xRegistry]On_Always::[DscLcmMaintenanceWindows]DscLcmMaintenanceWindows
SourceInfo           : 
Ensure               : Present
Force                : 
Hex                  : 
key                  : HKEY_LOCAL_MACHINE\SOFTWARE\DscLcmController\MaintenanceWindows\Always
ValueData            : {}
ValueName            : On
ValueType            : String
PSComputerName       : 
CimClassName         : DSC_xRegistryResource

ConfigurationName    : RootConfiguration
DependsOn            : 
ModuleName           : xPSDesiredStateConfiguration
ModuleVersion        : 9.1.0
PsDscRunAsCredential : 
ResourceId           : [xRegistry]DscVersion::[DscTagging]DscTagging
SourceInfo           : 
Ensure               : Present
Force                : 
Hex                  : 
key                  : HKEY_LOCAL_MACHINE\SOFTWARE\DscTagging
ValueData            : {0.3.0}
ValueName            : Version
ValueType            : String
PSComputerName       : 
CimClassName         : DSC_xRegistryResource

ConfigurationName    : RootConfiguration
DependsOn            : 
ModuleName           : xPSDesiredStateConfiguration
ModuleVersion        : 9.1.0
PsDscRunAsCredential : 
ResourceId           : [xRegistry]DscEnvironment::[DscTagging]DscTagging
SourceInfo           : 
Ensure               : Present
Force                : 
Hex                  : 
key                  : HKEY_LOCAL_MACHINE\SOFTWARE\DscTagging
ValueData            : {Test}
ValueName            : Environment
ValueType            : String
PSComputerName       : 
CimClassName         : DSC_xRegistryResource

ConfigurationName    : RootConfiguration
DependsOn            : 
ModuleName           : xPSDesiredStateConfiguration
ModuleVersion        : 9.1.0
PsDscRunAsCredential : 
ResourceId           : [xRegistry]DscBuildDate::[DscTagging]DscTagging
SourceInfo           : 
Ensure               : Present
Force                : 
Hex                  : 
key                  : HKEY_LOCAL_MACHINE\SOFTWARE\DscTagging
ValueData            : {11/01/2022 14:14:04}
ValueName            : BuildDate
ValueType            : String
PSComputerName       : 
CimClassName         : DSC_xRegistryResource

ConfigurationName    : RootConfiguration
DependsOn            : 
ModuleName           : xPSDesiredStateConfiguration
ModuleVersion        : 9.1.0
PsDscRunAsCredential : 
ResourceId           : [xRegistry]DscBuildNumber::[DscTagging]DscTagging
SourceInfo           : 
Ensure               : Present
Force                : 
Hex                  : 
key                  : HKEY_LOCAL_MACHINE\SOFTWARE\DscTagging
ValueData            : {}
ValueName            : BuildNumber
ValueType            : String
PSComputerName       : 
CimClassName         : DSC_xRegistryResource

ConfigurationName    : RootConfiguration
DependsOn            : 
ModuleName           : xPSDesiredStateConfiguration
ModuleVersion        : 9.1.0
PsDscRunAsCredential : 
ResourceId           : [xRegistry]DscModules::[DscTagging]DscTagging
SourceInfo           : 
Ensure               : Present
Force                : 
Hex                  : 
key                  : HKEY_LOCAL_MACHINE\SOFTWARE\DscTagging
ValueData            : {(AllNodes\Test\dev-tst-dsc-01, Environment\Test, Baselines\Security, Baselines\Server, Baselines\DscLcm)}
ValueName            : Layers
ValueType            : MultiString
PSComputerName       : 
CimClassName         : DSC_xRegistryResource

ConfigurationName       : RootConfiguration
DependsOn               : 
ModuleName              : JeaDsc
ModuleVersion           : 0.7.2
PsDscRunAsCredential    : 
ResourceId              : [JeaRoleCapabilities]ReadDiagnosticRole::[DscDiagnostic]DscDiagnostic
SourceInfo              : 
AliasDefinitions        : 
AssembliesToLoad        : 
Description             : 
Ensure                  : Present
EnvironmentVariables    : 
FormatsToProcess        : 
FunctionDefinitions     : {@{
                          	'Name' = 'Test-DscConfiguration'
                          	'ScriptBlock' = {
                              PSDesiredStateConfiguration\Test-DscConfiguration -Detailed -Verbose
                          }
                          }, @{
                          	'Name' = 'Get-DscConfigurationVersion'
                          	'ScriptBlock' = {
                              $hash = @{}
                              $key = Get-Item HKLM:\SOFTWARE\DscTagging -ErrorAction SilentlyContinue
                          
                              if ( $null -ne $key )
                              {
                                  foreach ($property in $key.Property)
                                  {
                                      $hash.Add($property, $key.GetValue($property))
                                  }
                              }
                              else
                              {
                                  $hash.Version = 'Unknown'
                              }
                          
                              New-Object -TypeName PSObject -Property $hash
                          }
                          }, @{
                          	'Name' = 'Update-DscConfiguration'
                          	'ScriptBlock' = {
                              PSDesiredStateConfiguration\Update-DscConfiguration -Wait -Verbose
                          }
                          }, @{
                          	'Name' = 'Get-DscLcmControllerLog'
                          	'ScriptBlock' = {
                              param (
                                  [Parameter()]
                                  [switch]$AutoCorrect,
                          
                                  [Parameter()]
                                  [switch]$Refresh,
                          
                                  [Parameter()]
                                  [switch]$Monitor,
                          
                                  [Parameter()]
                                  [int]$Last = 1000
                              )
                          
                              Import-Csv -Path C:\ProgramData\Dsc\LcmController\LcmControllerSummary.csv | Where-Object {
                                  if ($AutoCorrect)
                                  {
                                      [bool][int]$_.DoAutoCorrect -eq $AutoCorrect
                                  }
                                  else
                                  {
                                      $true
                                  }
                              } | Where-Object {
                                  if ($Refresh)
                                  {
                                      [bool][int]$_.DoRefresh -eq $Refresh
                                  }
                                  else
                                  {
                                      $true
                                  }
                              } | Where-Object {
                                  if ($Monitor)
                                  {
                                      [bool][int]$_.DoMonitor -eq $Monitor
                                  }
                                  else
                                  {
                                      $true
                                  }
                              } | Microsoft.PowerShell.Utility\Select-Object -Last $Last
                          }
                          }...}
ModulesToImport         : 
Path                    : C:\Program Files\WindowsPowerShell\Modules\DscDiagnostics\RoleCapabilities\ReadDiagnosticsRole.psrc
ScriptsToProcess        : 
TypesToProcess          : 
VariableDefinitions     : 
VisibleAliases          : 
VisibleCmdlets          : 
VisibleExternalCommands : 
VisibleFunctions        : {Test-DscConfiguration, Get-DscConfigurationVersion, Update-DscConfiguration, Get-DscLcmControllerLog...}
VisibleProviders        : 
PSComputerName          : 
CimClassName            : JeaRoleCapabilities

ConfigurationName          : RootConfiguration
DependsOn                  : {[JeaRoleCapabilities]ReadDiagnosticRole::[DscDiagnostic]DscDiagnostic}
ModuleName                 : JeaDsc
ModuleVersion              : 0.7.2
PsDscRunAsCredential       : 
ResourceId                 : [JeaSessionConfiguration]DscEndpoint::[DscDiagnostic]DscDiagnostic
SourceInfo                 : 
AliasDefinitions           : 
AssembliesToLoad           : 
Ensure                     : Present
EnvironmentVariables       : 
FormatsToProcess           : 
FunctionDefinitions        : 
GroupManagedServiceAccount : 
HungRegistrationTimeout    : 10
ModulesToImport            : {PSDesiredStateConfiguration, xDscDiagnostics}
MountUserDrive             : False
Name                       : DSC
RequiredGroups             : 
RoleDefinitions            : @{'Everyone' = @{'RoleCapabilities' = 'ReadDiagnosticsRole'}}
RunAsVirtualAccount        : True
RunAsVirtualAccountGroups  : 
ScriptsToProcess           : 
SessionType                : RestrictedRemoteServer
TranscriptDirectory        : 
TypesToProcess             : 
UserDriveMaximumSize       : 0
VariableDefinitions        : 
VisibleAliases             : 
VisibleCmdlets             : 
VisibleExternalCommands    : 
VisibleFunctions           : 
VisibleProviders           : 
PSComputerName             : 
CimClassName               : JeaSessionConfiguration




PS C:\Windows\system32> 

I won't copy the whole .mof file in, but in that I can see the changes I intended are there...

image

So not sure what happened with this by the time it reaches the node...? What am I missing?

Verbose logs

no error

DSC configuration

n/a

Suggested solution

???

Operating system the target node is running

PS C:\Windows\system32> Get-ComputerInfo -Property @('OsName','OsOperatingSystemSKU','OSArchitecture','WindowsVersion','WindowsBuildLabEx','OsLanguage','OsMuiLanguages')


OsName               : Microsoft Windows Server 2016 Datacenter
OsOperatingSystemSKU : DatacenterServerEdition
OsArchitecture       : 64-bit
WindowsBuildLabEx    : 14393.5429.amd64fre.rs1_release_inmarket.221012-1839
OsLanguage           : en-US
OsMuiLanguages       : {en-US}




PS C:\Windows\system32>

PowerShell version and build the target node is running

PS C:\Windows\system32> $PSVersionTable

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



PS C:\Windows\system32>

CommonTasks2 version

CommonTasks                  = '0.8.0'

(havent used commontasks2)

Build Failing on Fresh Clone

Problem description

Hi Folks,
i just cloned the repository and tried a build
git clone https://github.com/dsccommunity/dscworkshop ./dscworkshop/Build.ps1 -resolve

The Build Failed because it couldn't find the Manifest File.
Started the Powershell with WorkingDirectory
Start-Process powershell -WorkingDirectory C:\Repos\dscworkshop
and that error was resolved. I then got the issue that the modules couldn't be zipped.
Needed to do the following:
Add-Type -Path "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.IO.Compression.FileSystem.dll"
Then it worked.

Same Issues on a server at from customer.
How come i get these issues?

Also xSccmPrerequs and xSccmSqlSetup link old versions that are not downloaded as dependency.

Verbose logs

Error #1
===============================================================================
                        COMPILEDATUMRSOP

-------------------------------------------------------------------------------
  /./build/CompileDatumRsop
  C:\Repos\dscworkshop\output\RequiredModules\Sampler.DscPipeline\0.1.3\tasks\CompileDatumRsop.build.ps1:46

        Project Name               = 'DscWorkshop'
        Source Path                = 'source'
        Output Directory           = 'C:\Repos\dscworkshop\output'
        Release Notes path         = 'C:\Repos\dscworkshop\output\ReleaseNotes.md'
        Built Module Subdirectory  = 'C:\Repos\dscworkshop\output\AvoidPSPathOverlap'
        Module Manifest Path (src) = 'C:\Users\chkuewen.EUROPE\source\DscWorkshop.psd1'
ERROR: Cannot find path 'C:\Users\chkuewen.EUROPE\source\DscWorkshop.psd1' because it does not exist.
At C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules\Microsoft.PowerShell.Utility\Microsoft.PowerShell.Utility.psm1:544 char:35
+         foreach($resolvedPath in (Resolve-Path @PSBoundParameters))
+                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
At C:\Repos\dscworkshop\output\RequiredModules\Sampler.DscPipeline\0.1.3\tasks\CompileDatumRsop.build.ps1:46 char:1
+ task CompileDatumRsop {
+ ~~~~~~~~~~~~~~~~~~~~~~~
At C:\Repos\dscworkshop\build.ps1:331 char:13
+             task $workflow $workflowItem
+             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
At C:\Repos\dscworkshop\build.ps1:331 char:13
+             task $workflow $workflowItem
+             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Build FAILED. 7 tasks, 1 errors, 0 warnings 00:00:16.1617952
Resolve-Path : Cannot find path 'C:\Users\chkuewen.EUROPE\source\DscWorkshop.psd1' because it does not exist.
At
C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules\Microsoft.PowerShell.Utility\Microsoft.PowerShell.Utility.psm1:544
char:35
+         foreach($resolvedPath in (Resolve-Path @PSBoundParameters))
+                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (C:\Users\chkuew...scWorkshop.psd1:String) [Resolve-Path], ItemNotFoundE
   xception
    + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.ResolvePathCommand



Error #2
Compressing module 'ActiveDirectoryCSDsc' to 'C:\Repos\dscworkshop\output\CompressedModules\ActiveDirectoryCSDsc_5.0.0.zip'
ERROR: Unable to find type [System.IO.Compression.ZipFile].
At C:\Repos\dscworkshop\output\RequiredModules\Sampler.DscPipeline\0.1.1\tasks\CompressModulesWithChecksum.build.ps1:75 char:13
+             [System.IO.Compression.ZipFile]::CreateFromDirectory($mod ...
+             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
At C:\Repos\dscworkshop\output\RequiredModules\Sampler.DscPipeline\0.1.1\tasks\CompressModulesWithChecksum.build.ps1:35 char:1
+ task CompressModulesWithChecksum {
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
At C:\Repos\dscworkshop\build.ps1:331 char:13
+             task $workflow $workflowItem
+             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
At C:\Repos\dscworkshop\build.ps1:331 char:13
+             task $workflow $workflowItem
+             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Build FAILED. 13 tasks, 1 errors, 0 warnings 00:05:37.3333050
Unable to find type [System.IO.Compression.ZipFile].
At
C:\Repos\dscworkshop\output\RequiredModules\Sampler.DscPipeline\0.1.1\tasks\CompressModulesWithChecksum.build.ps1:75
char:13
+             [System.IO.Compression.ZipFile]::CreateFromDirectory($mod ...
+             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (System.IO.Compression.ZipFile:TypeName) [], ParentContainsErrorRecord
   Exception
    + FullyQualifiedErrorId : TypeNotFound

How to reproduce

git clone https://github.com/dsccommunity/dscworkshop ./dscworkshop/Build.ps1 -resolve

Expected behavior

Build runs sucessfully

Current behavior

build fails

Suggested solution

--

Operating system the target node is running

Win11 Powershell 5.1 and Win Server 2016 PS 5.1

PowerShell version and build the target node is running

--

Module version used

Current Build

Domain join does not work?

Hi!

I have a question rather than a problem this time.

I implemented this on AZURE (pipeline and release is in place), and created two servers (DSCDC01 and DSCFile01) for testing.
The automation account kicks in and applies most of the config, but fails on the "Computer" part.

image

image

image

image

The domain controller is configured, and a domain admin account install was created to facilitate the joining.

image

image

Is there anything I missed?

Thanks,
F.

PS: Otherwise great job, really appreciate the effort put into this

Pushing compiled configurations to a AutomatedLab Lab

Not sure if it's the right place for my question:

I want to push my compiled configurations to a lab built with AutomatedLab. From what I understand, Invoke-LabDSCConfiguration only works with powershell dsc configurations. For now, here is how I would do it:

  • Build the lab
  • Copy compiled files to the Hyper-V host
  • Put modules in a SMB share inside the lab
  • Run Start-DscConfiguration from my Hyper-V host
  • If last step doesn't work, put compiled configurations inside the lab, and run Start-DscConfiguration from there.

Is there a cleaner way to do it ? If possible, I would like to make it work with a completely isolated lab (no Internet access).

Thank you 😃

Julien

Datum.InvokeCommand does not work any longer

datum.yml

DatumHandlers:
  Datum.ProtectedData::ProtectedDatum:
    CommandOptions:
      PlainTextPassword: SomeSecret
  Datum.InvokeCommand::InvokeCommand:

Not a single command is resolved, neither in RSOP nor during configuration. There are no error messages, the string is just used verbatim as the configuration parameter.

Input

SqlServer:
  DefaultInstanceName: MSSQLSERVER
  Setup:
    Action: Install
    SourcePath: '[x={"\\mediaserver\install\sqlserver\$($Node.SqlVersion)"}]'

RSOP

SqlServer:
  DefaultInstanceName: MSSQLSERVER
  Setup:
    Action: Install
    SourcePath: '[x={"\\mediaserver\install\sqlserver\$($Node.SqlVersion)"}]'

Build.ps -ResolveDependency, Pester tests fail

===============================================================================
                        TESTCONFIGDATA

-------------------------------------------------------------------------------
  /./TestConfigData
  C:\git\dscworkshop\DSC\Build\Tasks\TestConfigData.ps1:1

testResultsPath is: C:\git\dscworkshop\DSC\BuildOutput\IntegrationTestResults.xml
testsPath is: C:\git\dscworkshop\DSC\Tests
BuildOutput is: C:\git\dscworkshop\DSC\BuildOutput
  [-] Error occurred in test script 'C:\git\dscworkshop\DSC\Tests\Acceptance\TestMofFiles.Tests.ps1' 0ms
    ParameterBindingValidationException: Cannot bind argument to parameter 'InputObject' because it is null.
    at Get-DatumNodesRecursive, C:\git\dscworkshop\DSC\Build\DscHelpers\Get-DatumNodesRecursive.ps1: line 38
    at Get-DatumNodesRecursive, C:\git\dscworkshop\DSC\Build\DscHelpers\Get-DatumNodesRecursive.ps1: line 41
    at Get-FilteredConfigurationData, C:\git\dscworkshop\DSC\Build\DscHelpers\Get-FilteredConfigurationData.ps1: line 15
    at <ScriptBlock>, C:\git\dscworkshop\DSC\Tests\Acceptance\TestMofFiles.Tests.ps1: line 12
    at <ScriptBlock>, C:\git\dscworkshop\DSC\BuildOutput\Modules\Pester\4.10.1\Pester.psm1: line 1111
    at Invoke-Pester<End>, C:\git\dscworkshop\DSC\BuildOutput\Modules\Pester\4.10.1\Pester.psm1: line 1137
    at <ScriptBlock>, C:\git\dscworkshop\DSC\Build\Tasks\TestConfigData.ps1: line 17
    at *Task, C:\git\dscworkshop\DSC\BuildOutput\Modules\InvokeBuild\5.6.0\Invoke-Build.ps1: line 530
    at *Task, C:\git\dscworkshop\DSC\BuildOutput\Modules\InvokeBuild\5.6.0\Invoke-Build.ps1: line 503
    at <ScriptBlock><End>, C:\git\dscworkshop\DSC\BuildOutput\Modules\InvokeBuild\5.6.0\Invoke-Build.ps1: line 690
    at <ScriptBlock>, C:\git\dscworkshop\DSC\Build.ps1: line 129
  [-] Error occurred in test script 'C:\git\dscworkshop\DSC\Tests\ConfigData\ConfigData.Tests.ps1' 0ms
    ParameterBindingValidationException: Cannot bind argument to parameter 'InputObject' because it is null.
    at Get-DatumNodesRecursive, C:\git\dscworkshop\DSC\Build\DscHelpers\Get-DatumNodesRecursive.ps1: line 38
    at Get-DatumNodesRecursive, C:\git\dscworkshop\DSC\Build\DscHelpers\Get-DatumNodesRecursive.ps1: line 41
    at Get-FilteredConfigurationData, C:\git\dscworkshop\DSC\Build\DscHelpers\Get-FilteredConfigurationData.ps1: line 15
    at <ScriptBlock>, C:\git\dscworkshop\DSC\Tests\ConfigData\ConfigData.Tests.ps1: line 8
    at <ScriptBlock>, C:\git\dscworkshop\DSC\BuildOutput\Modules\Pester\4.10.1\Pester.psm1: line 1111
    at Invoke-Pester<End>, C:\git\dscworkshop\DSC\BuildOutput\Modules\Pester\4.10.1\Pester.psm1: line 1137
    at <ScriptBlock>, C:\git\dscworkshop\DSC\Build\Tasks\TestConfigData.ps1: line 17
    at *Task, C:\git\dscworkshop\DSC\BuildOutput\Modules\InvokeBuild\5.6.0\Invoke-Build.ps1: line 530
    at *Task, C:\git\dscworkshop\DSC\BuildOutput\Modules\InvokeBuild\5.6.0\Invoke-Build.ps1: line 503
    at <ScriptBlock><End>, C:\git\dscworkshop\DSC\BuildOutput\Modules\InvokeBuild\5.6.0\Invoke-Build.ps1: line 690
    at <ScriptBlock>, C:\git\dscworkshop\DSC\Build.ps1: line 129
Tests completed in 1.37s
Tests Passed: 0, Failed: 2, Skipped: 0, Pending: 0, Inconclusive: 0
ERROR: Assertion failed.
At C:\git\dscworkshop\DSC\Build\Tasks\TestConfigData.ps1:19 char:5
+     assert ($testResults.FailedCount -eq 0)
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
At C:\git\dscworkshop\DSC\Build\Tasks\TestConfigData.ps1:1 char:1
+ task TestConfigData {
+ ~~~~~~~~~~~~~~~~~~~~~
At C:\git\dscworkshop\DSC\Build.ps1:156 char:5
+     task . Init,
+     ~~~~~~~~~~~~
Build FAILED. 8 tasks, 1 errors, 0 warnings 00:00:15.1234612
assert : Assertion failed.
At C:\git\dscworkshop\DSC\Build\Tasks\TestConfigData.ps1:19 char:5
+     assert ($testResults.FailedCount -eq 0)
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [Assert-Build], Exception
    + FullyQualifiedErrorId : Assert-Build

Build not working after project has been restructured

The build fails to work after the restructuring. Neither RSOP, nor MOF nor meta.mof are created.

The error occurs in the step "Generate RSOP". The error message is not helpful, and debugging ends at a .NET method call. I assume it happens because of FilesAndFolders being the entire Datum structure.

System.Management.Automation.MethodInvocationException: Exception calling "Serialize" with "2"
argument(s): "Too much recursion when traversing the object graph"

Additionally the data types seem to be off and cannot be merged any longer.
WARNING: Cannot merge different types REF:[baseType] | DIFF:[baseType_array]System.Object[] , returning most specific Datum.

The following verbose output was created

  C:\Users\JHP\OneDrive\Career\PowerShell_Book_Packt\dscworkshop\DscSample\.build\DSC\ConfigData.build.ps1:36

RandomWait: False
Not waiting, starting compilation job
Done /./PSModulePath_BuildModules 00:00:00.1419982

===============================================================================
                        TEST CONFIGDATA

-------------------------------------------------------------------------------
  /./Test_ConfigData
  C:\Users\JHP\OneDrive\Career\PowerShell_Book_Packt\dscworkshop\DscSample\.build.ps1:259

Executing all tests in 'C:\Users\JHP\OneDrive\Career\PowerShell_Book_Packt\dscworkshop\DscSample\Tests'

Executing script C:\Users\JHP\OneDrive\Career\PowerShell_Book_Packt\dscworkshop\DscSample\Tests\01 ConfigData\ConfigData.Tests.ps1

  Describing Datum Tree Definition
    [+] Exists in DSC_ConfigData Folder 2.66s
    [+] is Valid Yaml 265ms

  Describing Node Definition Files
    [+] DSCFile01 Should not be duplicated 401ms
    [+] DSCFile01 is not Empty 64ms
    [+] DSCFile01.yml has valid yaml 171ms
    [+] DSCWeb01 Should not be duplicated 76ms
    [+] DSCWeb01 is not Empty 165ms
    [+] DSCWeb01.yml has valid yaml 375ms
    [+] DSCFile02 Should not be duplicated 131ms
    [+] DSCFile02 is not Empty 341ms
    [+] DSCFile02.yml has valid yaml 273ms
    [+] DSCWeb02 Should not be duplicated 136ms
    [+] DSCWeb02 is not Empty 96ms
    [+] DSCWeb02.yml has valid yaml 178ms

  Describing Roles Definition Files
    [+] Items has valid yaml 444ms
    [+] Configurations has valid yaml 76ms
    [+] Configurations has valid yaml 107ms
    [+] SecurityBase has valid yaml 98ms
    [+] WindowsFeatures has valid yaml 133ms
    [+] WindowsServices has valid yaml 169ms
    [+] Baseline has valid yaml 166ms
    [+] LCM has valid yaml 182ms

  Describing Role Composition

    Context Nodes for environment Dev
WARNING: Cannot merge different types REF:[baseType] | DIFF:[baseType_array]System.Object[] , returning most specific Datum.
      [+] DSCFile01 has a valid Configurations Setting (!$null) 1.02s
WARNING: Cannot merge different types REF:[baseType] | DIFF:[baseType_array]System.Object[] , returning most specific Datum.
      [+] DSCWeb01 has a valid Configurations Setting (!$null) 428ms

    Context Nodes for environment Prod
WARNING: Cannot merge different types REF:[baseType] | DIFF:[baseType_array]System.Object[] , returning most specific Datum.
      [+] DSCFile01 has a valid Configurations Setting (!$null) 741ms
WARNING: Cannot merge different types REF:[baseType] | DIFF:[baseType_array]System.Object[] , returning most specific Datum.
      [+] DSCWeb01 has a valid Configurations Setting (!$null) 551ms
Tests completed in 9.46s
Tests Passed: 26, Failed: 0, Skipped: 0, Pending: 0, Inconclusive: 0
Done /./Test_ConfigData 00:00:17.5459946

===============================================================================
                        LOAD DATUM CONFIGDATA

-------------------------------------------------------------------------------
  /./Load_Datum_ConfigData
  C:\Users\JHP\OneDrive\Career\PowerShell_Book_Packt\dscworkshop\DscSample\.build\DSC\ConfigData.build.ps1:61

Loading Datum Definition from 'C:\Users\JHP\OneDrive\Career\PowerShell_Book_Packt\dscworkshop\DscSample\DSC_ConfigData\Datum.yml'
Node count: 2
Filter:
Node count after applying filter: 2
Done /./Load_Datum_ConfigData 00:00:02.1840010

===============================================================================
                        COMPILE DATUM RSOP

-------------------------------------------------------------------------------
  /./Compile_Datum_Rsop
  C:\Users\JHP\OneDrive\Career\PowerShell_Book_Packt\dscworkshop\DscSample\.build\DSC\ConfigData.build.ps1:118

Generating RSOP output for 2 nodes
WARNING: Cannot merge different types REF:[baseType] | DIFF:[baseType_array]System.Object[] , returning most specific Datum.

Hit Line breakpoint on 'C:\Users\JHP\OneDrive\Career\PowerShell_Book_Packt\DscWorkshop\dscsample\.build\DSC\ConfigData.build.ps1:140'

[DBG]: PS C:\Users\JHP\OneDrive\Career\PowerShell_Book_Packt\dscworkshop\DscSample>
[DBG]: PS C:\Users\JHP\OneDrive\Career\PowerShell_Book_Packt\dscworkshop\DscSample>
[DBG]: PS C:\Users\JHP\OneDrive\Career\PowerShell_Book_Packt\dscworkshop\DscSample>
[DBG]: PS C:\Users\JHP\OneDrive\Career\PowerShell_Book_Packt\dscworkshop\DscSample>
[DBG]: PS C:\Users\JHP\OneDrive\Career\PowerShell_Book_Packt\dscworkshop\DscSample>
[DBG]: PS C:\Users\JHP\OneDrive\Career\PowerShell_Book_Packt\dscworkshop\DscSample>
[DBG]: PS C:\Users\JHP\OneDrive\Career\PowerShell_Book_Packt\dscworkshop\DscSample>
[DBG]: PS C:\Users\JHP\OneDrive\Career\PowerShell_Book_Packt\dscworkshop\DscSample>
[DBG]: PS C:\Users\JHP\OneDrive\Career\PowerShell_Book_Packt\dscworkshop\DscSample>
[DBG]: PS C:\Users\JHP\OneDrive\Career\PowerShell_Book_Packt\dscworkshop\DscSample>
[DBG]: PS C:\Users\JHP\OneDrive\Career\PowerShell_Book_Packt\dscworkshop\DscSample>
[DBG]: PS C:\Users\JHP\OneDrive\Career\PowerShell_Book_Packt\dscworkshop\DscSample>
[DBG]: PS C:\Users\JHP\OneDrive\Career\PowerShell_Book_Packt\dscworkshop\DscSample>
[DBG]: PS C:\Users\JHP\OneDrive\Career\PowerShell_Book_Packt\dscworkshop\DscSample>
[DBG]: PS C:\Users\JHP\OneDrive\Career\PowerShell_Book_Packt\dscworkshop\DscSample>
[DBG]: PS C:\Users\JHP\OneDrive\Career\PowerShell_Book_Packt\dscworkshop\DscSample>
[DBG]: PS C:\Users\JHP\OneDrive\Career\PowerShell_Book_Packt\dscworkshop\DscSample>
[DBG]: PS C:\Users\JHP\OneDrive\Career\PowerShell_Book_Packt\dscworkshop\DscSample>
[DBG]: PS C:\Users\JHP\OneDrive\Career\PowerShell_Book_Packt\dscworkshop\DscSample>
[DBG]: PS C:\Users\JHP\OneDrive\Career\PowerShell_Book_Packt\dscworkshop\DscSample>
[DBG]: PS C:\Users\JHP\OneDrive\Career\PowerShell_Book_Packt\dscworkshop\DscSample>
[DBG]: PS C:\Users\JHP\OneDrive\Career\PowerShell_Book_Packt\dscworkshop\DscSample>
[DBG]: PS C:\Users\JHP\OneDrive\Career\PowerShell_Book_Packt\dscworkshop\DscSample>
[DBG]: PS C:\Users\JHP\OneDrive\Career\PowerShell_Book_Packt\dscworkshop\DscSample>
[DBG]: PS C:\Users\JHP\OneDrive\Career\PowerShell_Book_Packt\dscworkshop\DscSample>
ERROR: Exception calling "Serialize" with "2" argument(s): "Too much recursion when traversing the object graph"
At C:\Users\JHP\OneDrive\Career\PowerShell_Book_Packt\dscworkshop\DscSample\.build\DSC\ConfigData.build.ps1:140 char:21
+ ... $nodeRSOP | Convertto-Yaml -OutFile (Join-Path -Path $rsopOutputPathV ...
PS C:\Users\JHP\OneDrive\Career\PowerShell_Book_Packt\dscworkshop\DscSample> .\.build.ps1 -verbose
VERBOSE: Populating RepositorySourceLocation property for module InvokeBuild.
VERBOSE: Loading module from path 'C:\Users\JHP\OneDrive\Career\PowerShell_Book_Packt\dscworkshop\DscSample\BuildOutput\Modules\InvokeBuild\5.4.1\InvokeBuild.psm1'.
VERBOSE: Importing file clean.build
VERBOSE: Importing file Resolve-Dependency
VERBOSE: Importing file ConfigData.build
VERBOSE: Importing file FlattenArray
VERBOSE: Importing file Get-DatumNodesRecursive
VERBOSE: Importing file Get-DscErrorMessage
VERBOSE: Importing file Get-FilteredConfigurationData
VERBOSE: Importing file Set-PSModulePath
VERBOSE: Importing file Split-Array
VERBOSE: Populating RepositorySourceLocation property for module InvokeBuild.
VERBOSE: Loading module from path 'C:\Users\JHP\OneDrive\Career\PowerShell_Book_Packt\dscworkshop\DscSample\BuildOutput\Modules\InvokeBuild\5.4.1\InvokeBuild.psm1'.
VERBOSE: Importing file clean.build
VERBOSE: Importing file Resolve-Dependency
VERBOSE: Importing file ConfigData.build
VERBOSE: Importing file FlattenArray
VERBOSE: Importing file Get-DatumNodesRecursive
VERBOSE: Importing file Get-DscErrorMessage
VERBOSE: Importing file Get-FilteredConfigurationData
VERBOSE: Importing file Set-PSModulePath
VERBOSE: Importing file Split-Array
Build . C:\Users\JHP\OneDrive\Career\PowerShell_Book_Packt\dscworkshop\DscSample\.build.ps1

===============================================================================
                        CLEAN BUILDOUTPUT

-------------------------------------------------------------------------------
  /./Clean_BuildOutput
  C:\Users\JHP\OneDrive\Career\PowerShell_Book_Packt\dscworkshop\DscSample\.build\BuildHelpers\clean.build.ps1:12

Removing C:\Users\JHP\OneDrive\Career\PowerShell_Book_Packt\dscworkshop\DscSample\BuildOutput\*
Done /./Clean_BuildOutput 00:00:00.0799987
Task /./PSModulePath_BuildModules/Download_All_Dependencies skipped.

===============================================================================
                        PSMODULEPATH BUILDMODULES

-------------------------------------------------------------------------------
  /./PSModulePath_BuildModules
  C:\Users\JHP\OneDrive\Career\PowerShell_Book_Packt\dscworkshop\DscSample\.build\DSC\ConfigData.build.ps1:36

RandomWait: False
Not waiting, starting compilation job
VERBOSE: Removing the imported "Unprotect-Datum" function.
VERBOSE: Removing the imported "Test-TestHandlerFilter" function.
VERBOSE: Removing the imported "Test-ProtectedDatumFilter" function.
VERBOSE: Removing the imported "Resolve-DatumPath" function.
VERBOSE: Removing the imported "Resolve-Datum" function.
VERBOSE: Removing the imported "Protect-Datum" function.
VERBOSE: Removing the imported "New-DatumStructure" function.
VERBOSE: Removing the imported "New-DatumFileProvider" function.
VERBOSE: Removing the imported "Merge-Datum" function.
VERBOSE: Removing the imported "Invoke-TestHandlerAction" function.
VERBOSE: Removing the imported "Invoke-ProtectedDatumAction" function.
VERBOSE: Removing the imported "Get-MergeStrategyFromPath" function.
VERBOSE: Removing the imported "Get-FileProviderData" function.
VERBOSE: Removing the imported "Get-DatumRsop" function.
VERBOSE: Removing the imported "gin" alias.
VERBOSE: Removing the imported "gcb" alias.
VERBOSE: Removing the imported "stz" alias.
VERBOSE: Removing the imported "scb" alias.
VERBOSE: Removing the imported "gtz" alias.
VERBOSE: Removing the imported "New-TemporaryFile" function.
VERBOSE: Removing the imported "New-Guid" function.
VERBOSE: Removing the imported "Import-PowerShellDataFile" function.
VERBOSE: Removing the imported "Get-FileHash" function.
VERBOSE: Removing the imported "Format-Hex" function.
VERBOSE: Removing the imported "ConvertFrom-SddlString" function.
VERBOSE: Removing the imported "fhx" alias.
VERBOSE: Removing the imported "CFS" alias.
VERBOSE: Removing the imported "ConvertTo-Yaml" function.
VERBOSE: Removing the imported "ConvertFrom-Yaml" function.
VERBOSE: Removing the imported "cty" alias.
VERBOSE: Removing the imported "cfy" alias.
VERBOSE: Removing the imported "Add-ProtectedDataCredential" function.
VERBOSE: Removing the imported "Get-KeyEncryptionCertificate" function.
VERBOSE: Removing the imported "Add-ProtectedDataHmac" function.
VERBOSE: Removing the imported "Unprotect-Data" function.
VERBOSE: Removing the imported "Remove-ProtectedDataCredential" function.
VERBOSE: Removing the imported "Protect-Data" function.
VERBOSE: Removing the imported "Get-ProtectedDataSupportedTypes" function.
Done /./PSModulePath_BuildModules 00:00:00.2189957

===============================================================================
                        TEST CONFIGDATA

-------------------------------------------------------------------------------
  /./Test_ConfigData
  C:\Users\JHP\OneDrive\Career\PowerShell_Book_Packt\dscworkshop\DscSample\.build.ps1:259

Executing all tests in 'C:\Users\JHP\OneDrive\Career\PowerShell_Book_Packt\dscworkshop\DscSample\Tests'

Executing script C:\Users\JHP\OneDrive\Career\PowerShell_Book_Packt\dscworkshop\DscSample\Tests\01 ConfigData\ConfigData.Tests.ps1
VERBOSE: Populating RepositorySourceLocation property for module ProtectedData.
VERBOSE: Loading module from path 'C:\Users\JHP\OneDrive\Career\PowerShell_Book_Packt\dscworkshop\DscSample\BuildOutput\Modules\ProtectedData\4.1.3\ProtectedData.psm1'.
VERBOSE: Loading module from path 'C:\Users\JHP\OneDrive\Career\PowerShell_Book_Packt\dscworkshop\DscSample\BuildOutput\Modules\ProtectedData\4.1.3\ProtectedData.psd1'.
VERBOSE: Populating RepositorySourceLocation property for module ProtectedData.
VERBOSE: Loading module from path 'C:\Users\JHP\OneDrive\Career\PowerShell_Book_Packt\dscworkshop\DscSample\BuildOutput\Modules\ProtectedData\4.1.3\ProtectedData.psm1'.
VERBOSE: Exporting function 'Protect-Data'.
VERBOSE: Exporting function 'Unprotect-Data'.
VERBOSE: Exporting function 'Add-ProtectedDataHmac'.
VERBOSE: Exporting function 'Add-ProtectedDataCredential'.
VERBOSE: Exporting function 'Remove-ProtectedDataCredential'.
VERBOSE: Exporting function 'Get-ProtectedDataSupportedTypes'.
VERBOSE: Exporting function 'Get-KeyEncryptionCertificate'.
VERBOSE: Exporting function 'ConvertTo-X509Certificate2'.
VERBOSE: Exporting function 'GetCertificateFromPSPath'.
VERBOSE: Exporting function 'GetCertificateByThumbprint'.
VERBOSE: Exporting function 'Protect-DataWithAes'.
VERBOSE: Exporting function 'Get-Hmac'.
VERBOSE: Exporting function 'Unprotect-DataWithAes'.
VERBOSE: Exporting function 'Assert-ValidHmac'.
VERBOSE: Exporting function 'ByteArraysAreEqual'.
VERBOSE: Exporting function 'Add-KeyData'.
VERBOSE: Exporting function 'Unprotect-MatchingKeyData'.
VERBOSE: Exporting function 'ValidateKeyEncryptionCertificate'.
VERBOSE: Exporting function 'TestPrivateKey'.
VERBOSE: Exporting function 'Get-KeyGenerator'.
VERBOSE: Exporting function 'Get-PasswordHash'.
VERBOSE: Exporting function 'Get-RandomBytes'.
VERBOSE: Exporting function 'Protect-KeyDataWithCertificate'.
VERBOSE: Exporting function 'Protect-KeyDataWithRsaCertificate'.
VERBOSE: Exporting function 'Protect-KeyDataWithEcdhCertificate'.
VERBOSE: Exporting function 'Get-EcdhPublicKey'.
VERBOSE: Exporting function 'Get-AlgorithmOid'.
VERBOSE: Exporting function 'DecodeBinaryOid'.
VERBOSE: Exporting function 'Unprotect-KeyDataWithCertificate'.
VERBOSE: Exporting function 'Unprotect-KeyDataWithEcdhCertificate'.
VERBOSE: Exporting function 'Unprotect-KeyDataWithRsaCertificate'.
VERBOSE: Exporting function 'DecryptRsaData'.
VERBOSE: Exporting function 'Protect-KeyDataWithPassword'.
VERBOSE: Exporting function 'Unprotect-KeyDataWithPassword'.
VERBOSE: Exporting function 'ConvertTo-PinnedByteArray'.
VERBOSE: Exporting function 'ConvertFrom-ByteArray'.
VERBOSE: Exporting function 'Convert-StringToPinnedByteArray'.
VERBOSE: Exporting function 'Convert-SecureStringToPinnedByteArray'.
VERBOSE: Exporting function 'Convert-PSCredentialToPinnedByteArray'.
VERBOSE: Exporting function 'Convert-ByteArrayToString'.
VERBOSE: Exporting function 'Convert-ByteArrayToSecureString'.
VERBOSE: Exporting function 'Convert-ByteArrayToPSCredential'.
VERBOSE: Exporting function 'Test-IsProtectedData'.
VERBOSE: Exporting function 'Test-IsKeyData'.
VERBOSE: Exporting function 'Test-IsPasswordProtectedKeyData'.
VERBOSE: Exporting function 'Test-IsCertificateProtectedKeyData'.
VERBOSE: Importing function 'Add-ProtectedDataCredential'.
VERBOSE: Importing function 'Add-ProtectedDataHmac'.
VERBOSE: Importing function 'Get-KeyEncryptionCertificate'.
VERBOSE: Importing function 'Get-ProtectedDataSupportedTypes'.
VERBOSE: Importing function 'Protect-Data'.
VERBOSE: Importing function 'Remove-ProtectedDataCredential'.
VERBOSE: Importing function 'Unprotect-Data'.
VERBOSE: Populating RepositorySourceLocation property for module powershell-yaml.
VERBOSE: Loading module from path 'C:\Users\JHP\OneDrive\Career\PowerShell_Book_Packt\dscworkshop\DscSample\BuildOutput\Modules\powershell-yaml\0.3.4\Load-Assemblies.ps1'.
VERBOSE: Loading module from path 'C:\Users\JHP\OneDrive\Career\PowerShell_Book_Packt\dscworkshop\DscSample\BuildOutput\Modules\powershell-yaml\0.3.4\powershell-yaml.psm1'.
VERBOSE: Loading module from path 'C:\Users\JHP\OneDrive\Career\PowerShell_Book_Packt\dscworkshop\DscSample\BuildOutput\Modules\powershell-yaml\0.3.4\powershell-yaml.psd1'.
VERBOSE: Populating RepositorySourceLocation property for module powershell-yaml.
VERBOSE: Loading module from path 'C:\Users\JHP\OneDrive\Career\PowerShell_Book_Packt\dscworkshop\DscSample\BuildOutput\Modules\powershell-yaml\0.3.4\Load-Assemblies.ps1'.
VERBOSE: Dot-sourcing the script file 'C:\Users\JHP\OneDrive\Career\PowerShell_Book_Packt\dscworkshop\DscSample\BuildOutput\Modules\powershell-yaml\0.3.4\Load-Assemblies.ps1'.
VERBOSE: Loading module from path 'C:\Users\JHP\OneDrive\Career\PowerShell_Book_Packt\dscworkshop\DscSample\BuildOutput\Modules\powershell-yaml\0.3.4\powershell-yaml.psm1'.
VERBOSE: Importing function 'ConvertFrom-Yaml'.
VERBOSE: Importing function 'ConvertTo-Yaml'.
VERBOSE: Importing alias 'cfy'.
VERBOSE: Importing alias 'cty'.

  Describing Datum Tree Definition
    [+] Exists in DSC_ConfigData Folder 2.05s
    [+] is Valid Yaml 244ms

  Describing Node Definition Files
    [+] DSCFile01 Should not be duplicated 306ms
    [+] DSCFile01 is not Empty 82ms
    [+] DSCFile01.yml has valid yaml 139ms
    [+] DSCWeb01 Should not be duplicated 68ms
    [+] DSCWeb01 is not Empty 88ms
    [+] DSCWeb01.yml has valid yaml 143ms
    [+] DSCFile02 Should not be duplicated 76ms
    [+] DSCFile02 is not Empty 47ms
    [+] DSCFile02.yml has valid yaml 163ms
    [+] DSCWeb02 Should not be duplicated 68ms
    [+] DSCWeb02 is not Empty 69ms
    [+] DSCWeb02.yml has valid yaml 150ms

  Describing Roles Definition Files
    [+] Items has valid yaml 284ms
    [+] Configurations has valid yaml 89ms
    [+] Configurations has valid yaml 83ms
    [+] SecurityBase has valid yaml 69ms
    [+] WindowsFeatures has valid yaml 106ms
    [+] WindowsServices has valid yaml 134ms
    [+] Baseline has valid yaml 126ms
    [+] LCM has valid yaml 143ms

  Describing Role Composition

    Context Nodes for environment Dev
WARNING: Cannot merge different types REF:[baseType] | DIFF:[baseType_array]System.Object[] , returning most specific Datum.
VERBOSE:        Result found for Configurations
      [+] DSCFile01 has a valid Configurations Setting (!$null) 958ms
WARNING: Cannot merge different types REF:[baseType] | DIFF:[baseType_array]System.Object[] , returning most specific Datum.
VERBOSE:        Result found for Configurations
      [+] DSCWeb01 has a valid Configurations Setting (!$null) 425ms

    Context Nodes for environment Prod
WARNING: Cannot merge different types REF:[baseType] | DIFF:[baseType_array]System.Object[] , returning most specific Datum.
VERBOSE:        Result found for Configurations
      [+] DSCFile01 has a valid Configurations Setting (!$null) 620ms
WARNING: Cannot merge different types REF:[baseType] | DIFF:[baseType_array]System.Object[] , returning most specific Datum.
VERBOSE:        Result found for Configurations
      [+] DSCWeb01 has a valid Configurations Setting (!$null) 431ms
Tests completed in 7.17s
Tests Passed: 26, Failed: 0, Skipped: 0, Pending: 0, Inconclusive: 0
Done /./Test_ConfigData 00:00:11.2859915

===============================================================================
                        LOAD DATUM CONFIGDATA

-------------------------------------------------------------------------------
  /./Load_Datum_ConfigData
  C:\Users\JHP\OneDrive\Career\PowerShell_Book_Packt\dscworkshop\DscSample\.build\DSC\ConfigData.build.ps1:61

VERBOSE: Removing the imported "Unprotect-Datum" function.
VERBOSE: Removing the imported "Test-TestHandlerFilter" function.
VERBOSE: Removing the imported "Test-ProtectedDatumFilter" function.
VERBOSE: Removing the imported "Resolve-DatumPath" function.
VERBOSE: Removing the imported "Resolve-Datum" function.
VERBOSE: Removing the imported "Protect-Datum" function.
VERBOSE: Removing the imported "New-DatumStructure" function.
VERBOSE: Removing the imported "New-DatumFileProvider" function.
VERBOSE: Removing the imported "Merge-Datum" function.
VERBOSE: Removing the imported "Invoke-TestHandlerAction" function.
VERBOSE: Removing the imported "Invoke-ProtectedDatumAction" function.
VERBOSE: Removing the imported "Get-MergeStrategyFromPath" function.
VERBOSE: Removing the imported "Get-FileProviderData" function.
VERBOSE: Removing the imported "Get-DatumRsop" function.
VERBOSE: Removing the imported "gin" alias.
VERBOSE: Removing the imported "gcb" alias.
VERBOSE: Removing the imported "stz" alias.
VERBOSE: Removing the imported "scb" alias.
VERBOSE: Removing the imported "gtz" alias.
VERBOSE: Removing the imported "New-TemporaryFile" function.
VERBOSE: Removing the imported "New-Guid" function.
VERBOSE: Removing the imported "Import-PowerShellDataFile" function.
VERBOSE: Removing the imported "Get-FileHash" function.
VERBOSE: Removing the imported "Format-Hex" function.
VERBOSE: Removing the imported "ConvertFrom-SddlString" function.
VERBOSE: Removing the imported "fhx" alias.
VERBOSE: Removing the imported "CFS" alias.
VERBOSE: Removing the imported "Add-AssertionOperator" function.
VERBOSE: Removing the imported "BeforeAll" function.
VERBOSE: Removing the imported "Assert-VerifiableMocks" function.
VERBOSE: Removing the imported "Should" function.
VERBOSE: Removing the imported "Setup" function.
VERBOSE: Removing the imported "Set-TestInconclusive" function.
VERBOSE: Removing the imported "Set-DynamicParameterVariable" function.
VERBOSE: Removing the imported "SafeGetCommand" function.
VERBOSE: Removing the imported "New-PesterOption" function.
VERBOSE: Removing the imported "New-MockObject" function.
VERBOSE: Removing the imported "New-Fixture" function.
VERBOSE: Removing the imported "Mock" function.
VERBOSE: Removing the imported "It" function.
VERBOSE: Removing the imported "Invoke-Pester" function.
VERBOSE: Removing the imported "Invoke-Mock" function.
VERBOSE: Removing the imported "Invoke-Gherkin" function.
VERBOSE: Removing the imported "InModuleScope" function.
VERBOSE: Removing the imported "In" function.
VERBOSE: Removing the imported "GherkinStep" function.
VERBOSE: Removing the imported "Get-TestDriveItem" function.
VERBOSE: Removing the imported "Get-MockDynamicParameter" function.
VERBOSE: Removing the imported "Find-GherkinStep" function.
VERBOSE: Removing the imported "Describe" function.
VERBOSE: Removing the imported "Context" function.
VERBOSE: Removing the imported "BeforeEachScenario" function.
VERBOSE: Removing the imported "BeforeEachFeature" function.
VERBOSE: Removing the imported "BeforeEach" function.
VERBOSE: Removing the imported "AfterEach" function.
VERBOSE: Removing the imported "Assert-VerifiableMock" function.
VERBOSE: Removing the imported "Assert-MockCalled" function.
VERBOSE: Removing the imported "AfterEachScenario" function.
VERBOSE: Removing the imported "AfterEachFeature" function.
VERBOSE: Removing the imported "AfterAll" function.
VERBOSE: Removing the imported "But" alias.
VERBOSE: Removing the imported "And" alias.
VERBOSE: Removing the imported "When" alias.
VERBOSE: Removing the imported "Then" alias.
VERBOSE: Removing the imported "Given" alias.
VERBOSE: Removing the imported "ConvertTo-Yaml" function.
VERBOSE: Removing the imported "ConvertFrom-Yaml" function.
VERBOSE: Removing the imported "cty" alias.
VERBOSE: Removing the imported "cfy" alias.
VERBOSE: Removing the imported "Get-KeyEncryptionCertificate" function.
VERBOSE: Removing the imported "Add-ProtectedDataHmac" function.
VERBOSE: Removing the imported "Add-ProtectedDataCredential" function.
VERBOSE: Removing the imported "Unprotect-Data" function.
VERBOSE: Removing the imported "Remove-ProtectedDataCredential" function.
VERBOSE: Removing the imported "Protect-Data" function.
VERBOSE: Removing the imported "Get-ProtectedDataSupportedTypes" function.
VERBOSE: Loading module from path 'C:\Users\JHP\OneDrive\Career\PowerShell_Book_Packt\dscworkshop\DscSample\BuildOutput\Modules\ProtectedData\4.1.3\ProtectedData.psd1'.
VERBOSE: Populating RepositorySourceLocation property for module ProtectedData.
VERBOSE: Loading module from path 'C:\Users\JHP\OneDrive\Career\PowerShell_Book_Packt\dscworkshop\DscSample\BuildOutput\Modules\ProtectedData\4.1.3\ProtectedData.psm1'.
VERBOSE: Exporting function 'Protect-Data'.
VERBOSE: Exporting function 'Unprotect-Data'.
VERBOSE: Exporting function 'Add-ProtectedDataHmac'.
VERBOSE: Exporting function 'Add-ProtectedDataCredential'.
VERBOSE: Exporting function 'Remove-ProtectedDataCredential'.
VERBOSE: Exporting function 'Get-ProtectedDataSupportedTypes'.
VERBOSE: Exporting function 'Get-KeyEncryptionCertificate'.
VERBOSE: Exporting function 'ConvertTo-X509Certificate2'.
VERBOSE: Exporting function 'GetCertificateFromPSPath'.
VERBOSE: Exporting function 'GetCertificateByThumbprint'.
VERBOSE: Exporting function 'Protect-DataWithAes'.
VERBOSE: Exporting function 'Get-Hmac'.
VERBOSE: Exporting function 'Unprotect-DataWithAes'.
VERBOSE: Exporting function 'Assert-ValidHmac'.
VERBOSE: Exporting function 'ByteArraysAreEqual'.
VERBOSE: Exporting function 'Add-KeyData'.
VERBOSE: Exporting function 'Unprotect-MatchingKeyData'.
VERBOSE: Exporting function 'ValidateKeyEncryptionCertificate'.
VERBOSE: Exporting function 'TestPrivateKey'.
VERBOSE: Exporting function 'Get-KeyGenerator'.
VERBOSE: Exporting function 'Get-PasswordHash'.
VERBOSE: Exporting function 'Get-RandomBytes'.
VERBOSE: Exporting function 'Protect-KeyDataWithCertificate'.
VERBOSE: Exporting function 'Protect-KeyDataWithRsaCertificate'.
VERBOSE: Exporting function 'Protect-KeyDataWithEcdhCertificate'.
VERBOSE: Exporting function 'Get-EcdhPublicKey'.
VERBOSE: Exporting function 'Get-AlgorithmOid'.
VERBOSE: Exporting function 'DecodeBinaryOid'.
VERBOSE: Exporting function 'Unprotect-KeyDataWithCertificate'.
VERBOSE: Exporting function 'Unprotect-KeyDataWithEcdhCertificate'.
VERBOSE: Exporting function 'Unprotect-KeyDataWithRsaCertificate'.
VERBOSE: Exporting function 'DecryptRsaData'.
VERBOSE: Exporting function 'Protect-KeyDataWithPassword'.
VERBOSE: Exporting function 'Unprotect-KeyDataWithPassword'.
VERBOSE: Exporting function 'ConvertTo-PinnedByteArray'.
VERBOSE: Exporting function 'ConvertFrom-ByteArray'.
VERBOSE: Exporting function 'Convert-StringToPinnedByteArray'.
VERBOSE: Exporting function 'Convert-SecureStringToPinnedByteArray'.
VERBOSE: Exporting function 'Convert-PSCredentialToPinnedByteArray'.
VERBOSE: Exporting function 'Convert-ByteArrayToString'.
VERBOSE: Exporting function 'Convert-ByteArrayToSecureString'.
VERBOSE: Exporting function 'Convert-ByteArrayToPSCredential'.
VERBOSE: Exporting function 'Test-IsProtectedData'.
VERBOSE: Exporting function 'Test-IsKeyData'.
VERBOSE: Exporting function 'Test-IsPasswordProtectedKeyData'.
VERBOSE: Exporting function 'Test-IsCertificateProtectedKeyData'.
VERBOSE: Importing function 'Add-ProtectedDataCredential'.
VERBOSE: Importing function 'Add-ProtectedDataHmac'.
VERBOSE: Importing function 'Get-KeyEncryptionCertificate'.
VERBOSE: Importing function 'Get-ProtectedDataSupportedTypes'.
VERBOSE: Importing function 'Protect-Data'.
VERBOSE: Importing function 'Remove-ProtectedDataCredential'.
VERBOSE: Importing function 'Unprotect-Data'.
VERBOSE: Loading module from path 'C:\Users\JHP\OneDrive\Career\PowerShell_Book_Packt\dscworkshop\DscSample\BuildOutput\Modules\PowerShell-Yaml\0.3.4\PowerShell-Yaml.psd1'.
VERBOSE: Populating RepositorySourceLocation property for module PowerShell-Yaml.
VERBOSE: Loading module from path 'C:\Users\JHP\OneDrive\Career\PowerShell_Book_Packt\dscworkshop\DscSample\BuildOutput\Modules\PowerShell-Yaml\0.3.4\Load-Assemblies.ps1'.
VERBOSE: Dot-sourcing the script file 'C:\Users\JHP\OneDrive\Career\PowerShell_Book_Packt\dscworkshop\DscSample\BuildOutput\Modules\PowerShell-Yaml\0.3.4\Load-Assemblies.ps1'.
VERBOSE: Loading module from path 'C:\Users\JHP\OneDrive\Career\PowerShell_Book_Packt\dscworkshop\DscSample\BuildOutput\Modules\PowerShell-Yaml\0.3.4\powershell-yaml.psm1'.
VERBOSE: Importing function 'ConvertFrom-Yaml'.
VERBOSE: Importing function 'ConvertTo-Yaml'.
VERBOSE: Importing alias 'cfy'.
VERBOSE: Importing alias 'cty'.
VERBOSE: Loading module from path 'C:\Users\JHP\OneDrive\Career\PowerShell_Book_Packt\dscworkshop\DscSample\BuildOutput\Modules\Datum\0.0.32\Datum.psd1'.
VERBOSE: Populating RepositorySourceLocation property for module Datum.
VERBOSE: Loading module from path 'C:\Users\JHP\OneDrive\Career\PowerShell_Book_Packt\dscworkshop\DscSample\BuildOutput\Modules\Datum\0.0.32\ScriptsToProcess\Get-DscSplattedResource.ps1'.
VERBOSE: Dot-sourcing the script file 'C:\Users\JHP\OneDrive\Career\PowerShell_Book_Packt\dscworkshop\DscSample\BuildOutput\Modules\Datum\0.0.32\ScriptsToProcess\Get-DscSplattedResource.ps1'.
VERBOSE: Loading module from path 'C:\Users\JHP\OneDrive\Career\PowerShell_Book_Packt\dscworkshop\DscSample\BuildOutput\Modules\Datum\0.0.32\ScriptsToProcess\Resolve-NodeProperty.ps1'.
VERBOSE: Dot-sourcing the script file 'C:\Users\JHP\OneDrive\Career\PowerShell_Book_Packt\dscworkshop\DscSample\BuildOutput\Modules\Datum\0.0.32\ScriptsToProcess\Resolve-NodeProperty.ps1'.
VERBOSE: Loading module from path 'C:\Users\JHP\OneDrive\Career\PowerShell_Book_Packt\dscworkshop\DscSample\BuildOutput\Modules\Datum\0.0.32\Datum.psm1'.
VERBOSE: Exporting function 'Compare-Hashtable'.
VERBOSE: Exporting function 'ConvertTo-Datum'.
VERBOSE: Exporting function 'Get-DatumType'.
VERBOSE: Exporting function 'Get-MergeStrategyFromString'.
VERBOSE: Exporting function 'Merge-DatumArray'.
VERBOSE: Exporting function 'Merge-Hashtable'.
VERBOSE: Exporting function 'Get-DatumRsop'.
VERBOSE: Exporting function 'Get-FileProviderData'.
VERBOSE: Exporting function 'Get-MergeStrategyFromPath'.
VERBOSE: Exporting function 'Invoke-ProtectedDatumAction'.
VERBOSE: Exporting function 'Invoke-TestHandlerAction'.
VERBOSE: Exporting function 'Merge-Datum'.
VERBOSE: Exporting function 'New-DatumFileProvider'.
VERBOSE: Exporting function 'New-DatumStructure'.
VERBOSE: Exporting function 'Protect-Datum'.
VERBOSE: Exporting function 'Resolve-Datum'.
VERBOSE: Exporting function 'Resolve-DatumPath'.
VERBOSE: Exporting function 'Test-ProtectedDatumFilter'.
VERBOSE: Exporting function 'Test-TestHandlerFilter'.
VERBOSE: Exporting function 'Unprotect-Datum'.
VERBOSE: Importing function 'Get-DatumRsop'.
VERBOSE: Importing function 'Get-FileProviderData'.
VERBOSE: Importing function 'Get-MergeStrategyFromPath'.
VERBOSE: Importing function 'Invoke-ProtectedDatumAction'.
VERBOSE: Importing function 'Invoke-TestHandlerAction'.
VERBOSE: Importing function 'Merge-Datum'.
VERBOSE: Importing function 'New-DatumFileProvider'.
VERBOSE: Importing function 'New-DatumStructure'.
VERBOSE: Importing function 'Protect-Datum'.
VERBOSE: Importing function 'Resolve-Datum'.
VERBOSE: Importing function 'Resolve-DatumPath'.
VERBOSE: Importing function 'Test-ProtectedDatumFilter'.
VERBOSE: Importing function 'Test-TestHandlerFilter'.
VERBOSE: Importing function 'Unprotect-Datum'.
Loading Datum Definition from 'C:\Users\JHP\OneDrive\Career\PowerShell_Book_Packt\dscworkshop\DscSample\DSC_ConfigData\Datum.yml'
Node count: 2
Filter:
Node count after applying filter: 2
Done /./Load_Datum_ConfigData 00:00:02.0749772

===============================================================================
                        COMPILE DATUM RSOP

-------------------------------------------------------------------------------
  /./Compile_Datum_Rsop
PS C:\Users\JHP\OneDrive\Career\PowerShell_Book_Packt\dscworkshop\DscSample> .\.build.ps1 -Verbose
VERBOSE: Populating RepositorySourceLocation property for module InvokeBuild.
VERBOSE: Loading module from path 'C:\Users\JHP\OneDrive\Career\PowerShell_Book_Packt\dscworkshop\DscSample\BuildOutput\Modules\InvokeBuild\5.4.1\InvokeBuild.psm1'.
VERBOSE: Importing file clean.build
VERBOSE: Importing file Resolve-Dependency
VERBOSE: Importing file ConfigData.build
VERBOSE: Importing file FlattenArray
VERBOSE: Importing file Get-DatumNodesRecursive
VERBOSE: Importing file Get-DscErrorMessage
VERBOSE: Importing file Get-FilteredConfigurationData
VERBOSE: Importing file Set-PSModulePath
VERBOSE: Importing file Split-Array
VERBOSE: Populating RepositorySourceLocation property for module InvokeBuild.
VERBOSE: Loading module from path 'C:\Users\JHP\OneDrive\Career\PowerShell_Book_Packt\dscworkshop\DscSample\BuildOutput\Modules\InvokeBuild\5.4.1\InvokeBuild.psm1'.
VERBOSE: Importing file clean.build
VERBOSE: Importing file Resolve-Dependency
VERBOSE: Importing file ConfigData.build
VERBOSE: Importing file FlattenArray
VERBOSE: Importing file Get-DatumNodesRecursive
VERBOSE: Importing file Get-DscErrorMessage
VERBOSE: Importing file Get-FilteredConfigurationData
VERBOSE: Importing file Set-PSModulePath
VERBOSE: Importing file Split-Array
Build . C:\Users\JHP\OneDrive\Career\PowerShell_Book_Packt\dscworkshop\DscSample\.build.ps1

===============================================================================
                        CLEAN BUILDOUTPUT

-------------------------------------------------------------------------------
  /./Clean_BuildOutput
  C:\Users\JHP\OneDrive\Career\PowerShell_Book_Packt\dscworkshop\DscSample\.build\BuildHelpers\clean.build.ps1:12

Removing C:\Users\JHP\OneDrive\Career\PowerShell_Book_Packt\dscworkshop\DscSample\BuildOutput\*
Done /./Clean_BuildOutput 00:00:00.1809698
Task /./PSModulePath_BuildModules/Download_All_Dependencies skipped.

===============================================================================
                        PSMODULEPATH BUILDMODULES

-------------------------------------------------------------------------------
  /./PSModulePath_BuildModules
  C:\Users\JHP\OneDrive\Career\PowerShell_Book_Packt\dscworkshop\DscSample\.build\DSC\ConfigData.build.ps1:36

RandomWait: False
Not waiting, starting compilation job
VERBOSE: Removing the imported "Unprotect-Datum" function.
VERBOSE: Removing the imported "Test-TestHandlerFilter" function.
VERBOSE: Removing the imported "Test-ProtectedDatumFilter" function.
VERBOSE: Removing the imported "Resolve-DatumPath" function.
VERBOSE: Removing the imported "Resolve-Datum" function.
VERBOSE: Removing the imported "Protect-Datum" function.
VERBOSE: Removing the imported "New-DatumStructure" function.
VERBOSE: Removing the imported "New-DatumFileProvider" function.
VERBOSE: Removing the imported "Merge-Datum" function.
VERBOSE: Removing the imported "Invoke-TestHandlerAction" function.
VERBOSE: Removing the imported "Invoke-ProtectedDatumAction" function.
VERBOSE: Removing the imported "Get-MergeStrategyFromPath" function.
VERBOSE: Removing the imported "Get-FileProviderData" function.
VERBOSE: Removing the imported "Get-DatumRsop" function.
VERBOSE: Removing the imported "gin" alias.
VERBOSE: Removing the imported "gcb" alias.
VERBOSE: Removing the imported "stz" alias.
VERBOSE: Removing the imported "scb" alias.
VERBOSE: Removing the imported "gtz" alias.
VERBOSE: Removing the imported "New-TemporaryFile" function.
VERBOSE: Removing the imported "New-Guid" function.
VERBOSE: Removing the imported "Import-PowerShellDataFile" function.
VERBOSE: Removing the imported "Get-FileHash" function.
VERBOSE: Removing the imported "Format-Hex" function.
VERBOSE: Removing the imported "ConvertFrom-SddlString" function.
VERBOSE: Removing the imported "fhx" alias.
VERBOSE: Removing the imported "CFS" alias.
VERBOSE: Removing the imported "ConvertTo-Yaml" function.
VERBOSE: Removing the imported "ConvertFrom-Yaml" function.
VERBOSE: Removing the imported "cty" alias.
VERBOSE: Removing the imported "cfy" alias.
VERBOSE: Removing the imported "Add-ProtectedDataCredential" function.
VERBOSE: Removing the imported "Get-KeyEncryptionCertificate" function.
VERBOSE: Removing the imported "Add-ProtectedDataHmac" function.
VERBOSE: Removing the imported "Unprotect-Data" function.
VERBOSE: Removing the imported "Remove-ProtectedDataCredential" function.
VERBOSE: Removing the imported "Protect-Data" function.
VERBOSE: Removing the imported "Get-ProtectedDataSupportedTypes" function.
Done /./PSModulePath_BuildModules 00:00:00.3070006

===============================================================================
                        TEST CONFIGDATA

-------------------------------------------------------------------------------
  /./Test_ConfigData
  C:\Users\JHP\OneDrive\Career\PowerShell_Book_Packt\dscworkshop\DscSample\.build.ps1:259

Executing all tests in 'C:\Users\JHP\OneDrive\Career\PowerShell_Book_Packt\dscworkshop\DscSample\Tests'

Executing script C:\Users\JHP\OneDrive\Career\PowerShell_Book_Packt\dscworkshop\DscSample\Tests\01 ConfigData\ConfigData.Tests.ps1
VERBOSE: Populating RepositorySourceLocation property for module ProtectedData.
VERBOSE: Loading module from path 'C:\Users\JHP\OneDrive\Career\PowerShell_Book_Packt\dscworkshop\DscSample\BuildOutput\Modules\ProtectedData\4.1.3\ProtectedData.psm1'.
VERBOSE: Loading module from path 'C:\Users\JHP\OneDrive\Career\PowerShell_Book_Packt\dscworkshop\DscSample\BuildOutput\Modules\ProtectedData\4.1.3\ProtectedData.psd1'.
VERBOSE: Populating RepositorySourceLocation property for module ProtectedData.
VERBOSE: Loading module from path 'C:\Users\JHP\OneDrive\Career\PowerShell_Book_Packt\dscworkshop\DscSample\BuildOutput\Modules\ProtectedData\4.1.3\ProtectedData.psm1'.
VERBOSE: Exporting function 'Protect-Data'.
VERBOSE: Exporting function 'Unprotect-Data'.
VERBOSE: Exporting function 'Add-ProtectedDataHmac'.
VERBOSE: Exporting function 'Add-ProtectedDataCredential'.
VERBOSE: Exporting function 'Remove-ProtectedDataCredential'.
VERBOSE: Exporting function 'Get-ProtectedDataSupportedTypes'.
VERBOSE: Exporting function 'Get-KeyEncryptionCertificate'.
VERBOSE: Exporting function 'ConvertTo-X509Certificate2'.
VERBOSE: Exporting function 'GetCertificateFromPSPath'.
VERBOSE: Exporting function 'GetCertificateByThumbprint'.
VERBOSE: Exporting function 'Protect-DataWithAes'.
VERBOSE: Exporting function 'Get-Hmac'.
VERBOSE: Exporting function 'Unprotect-DataWithAes'.
VERBOSE: Exporting function 'Assert-ValidHmac'.
VERBOSE: Exporting function 'ByteArraysAreEqual'.
VERBOSE: Exporting function 'Add-KeyData'.
VERBOSE: Exporting function 'Unprotect-MatchingKeyData'.
VERBOSE: Exporting function 'ValidateKeyEncryptionCertificate'.
VERBOSE: Exporting function 'TestPrivateKey'.
VERBOSE: Exporting function 'Get-KeyGenerator'.
VERBOSE: Exporting function 'Get-PasswordHash'.
VERBOSE: Exporting function 'Get-RandomBytes'.
VERBOSE: Exporting function 'Protect-KeyDataWithCertificate'.
VERBOSE: Exporting function 'Protect-KeyDataWithRsaCertificate'.
VERBOSE: Exporting function 'Protect-KeyDataWithEcdhCertificate'.
VERBOSE: Exporting function 'Get-EcdhPublicKey'.
VERBOSE: Exporting function 'Get-AlgorithmOid'.
VERBOSE: Exporting function 'DecodeBinaryOid'.
VERBOSE: Exporting function 'Unprotect-KeyDataWithCertificate'.
VERBOSE: Exporting function 'Unprotect-KeyDataWithEcdhCertificate'.
VERBOSE: Exporting function 'Unprotect-KeyDataWithRsaCertificate'.
VERBOSE: Exporting function 'DecryptRsaData'.
VERBOSE: Exporting function 'Protect-KeyDataWithPassword'.
VERBOSE: Exporting function 'Unprotect-KeyDataWithPassword'.
VERBOSE: Exporting function 'ConvertTo-PinnedByteArray'.
VERBOSE: Exporting function 'ConvertFrom-ByteArray'.
VERBOSE: Exporting function 'Convert-StringToPinnedByteArray'.
VERBOSE: Exporting function 'Convert-SecureStringToPinnedByteArray'.
VERBOSE: Exporting function 'Convert-PSCredentialToPinnedByteArray'.
VERBOSE: Exporting function 'Convert-ByteArrayToString'.
VERBOSE: Exporting function 'Convert-ByteArrayToSecureString'.
VERBOSE: Exporting function 'Convert-ByteArrayToPSCredential'.
VERBOSE: Exporting function 'Test-IsProtectedData'.
VERBOSE: Exporting function 'Test-IsKeyData'.
VERBOSE: Exporting function 'Test-IsPasswordProtectedKeyData'.
VERBOSE: Exporting function 'Test-IsCertificateProtectedKeyData'.
VERBOSE: Importing function 'Add-ProtectedDataCredential'.
VERBOSE: Importing function 'Add-ProtectedDataHmac'.
VERBOSE: Importing function 'Get-KeyEncryptionCertificate'.
VERBOSE: Importing function 'Get-ProtectedDataSupportedTypes'.
VERBOSE: Importing function 'Protect-Data'.
VERBOSE: Importing function 'Remove-ProtectedDataCredential'.
VERBOSE: Importing function 'Unprotect-Data'.
VERBOSE: Populating RepositorySourceLocation property for module powershell-yaml.
VERBOSE: Loading module from path 'C:\Users\JHP\OneDrive\Career\PowerShell_Book_Packt\dscworkshop\DscSample\BuildOutput\Modules\powershell-yaml\0.3.4\Load-Assemblies.ps1'.
VERBOSE: Loading module from path 'C:\Users\JHP\OneDrive\Career\PowerShell_Book_Packt\dscworkshop\DscSample\BuildOutput\Modules\powershell-yaml\0.3.4\powershell-yaml.psm1'.
VERBOSE: Loading module from path 'C:\Users\JHP\OneDrive\Career\PowerShell_Book_Packt\dscworkshop\DscSample\BuildOutput\Modules\powershell-yaml\0.3.4\powershell-yaml.psd1'.
VERBOSE: Populating RepositorySourceLocation property for module powershell-yaml.
VERBOSE: Loading module from path 'C:\Users\JHP\OneDrive\Career\PowerShell_Book_Packt\dscworkshop\DscSample\BuildOutput\Modules\powershell-yaml\0.3.4\Load-Assemblies.ps1'.
VERBOSE: Dot-sourcing the script file 'C:\Users\JHP\OneDrive\Career\PowerShell_Book_Packt\dscworkshop\DscSample\BuildOutput\Modules\powershell-yaml\0.3.4\Load-Assemblies.ps1'.
VERBOSE: Loading module from path 'C:\Users\JHP\OneDrive\Career\PowerShell_Book_Packt\dscworkshop\DscSample\BuildOutput\Modules\powershell-yaml\0.3.4\powershell-yaml.psm1'.
VERBOSE: Importing function 'ConvertFrom-Yaml'.
VERBOSE: Importing function 'ConvertTo-Yaml'.
VERBOSE: Importing alias 'cfy'.
VERBOSE: Importing alias 'cty'.

  Describing Datum Tree Definition
    [+] Exists in DSC_ConfigData Folder 3.14s
    [+] is Valid Yaml 298ms

  Describing Node Definition Files
    [+] DSCFile01 Should not be duplicated 637ms
    [+] DSCFile01 is not Empty 315ms
    [+] DSCFile01.yml has valid yaml 341ms
    [+] DSCWeb01 Should not be duplicated 103ms
    [+] DSCWeb01 is not Empty 65ms
    [+] DSCWeb01.yml has valid yaml 292ms
    [+] DSCFile02 Should not be duplicated 189ms
    [+] DSCFile02 is not Empty 201ms
    [+] DSCFile02.yml has valid yaml 252ms
    [+] DSCWeb02 Should not be duplicated 106ms
    [+] DSCWeb02 is not Empty 133ms
    [+] DSCWeb02.yml has valid yaml 229ms

  Describing Roles Definition Files
    [+] Items has valid yaml 788ms
    [+] Configurations has valid yaml 129ms
    [+] Configurations has valid yaml 174ms
    [+] SecurityBase has valid yaml 185ms
    [+] WindowsFeatures has valid yaml 189ms
    [+] WindowsServices has valid yaml 221ms
    [+] Baseline has valid yaml 369ms
    [+] LCM has valid yaml 438ms

  Describing Role Composition

    Context Nodes for environment Dev
WARNING: Cannot merge different types REF:[baseType] | DIFF:[baseType_array]System.Object[] , returning most specific Datum.
VERBOSE:        Result found for Configurations
      [+] DSCFile01 has a valid Configurations Setting (!$null) 2.18s
WARNING: Cannot merge different types REF:[baseType] | DIFF:[baseType_array]System.Object[] , returning most specific Datum.
VERBOSE:        Result found for Configurations
      [+] DSCWeb01 has a valid Configurations Setting (!$null) 875ms

    Context Nodes for environment Prod
WARNING: Cannot merge different types REF:[baseType] | DIFF:[baseType_array]System.Object[] , returning most specific Datum.
VERBOSE:        Result found for Configurations
      [+] DSCFile01 has a valid Configurations Setting (!$null) 964ms
WARNING: Cannot merge different types REF:[baseType] | DIFF:[baseType_array]System.Object[] , returning most specific Datum.
VERBOSE:        Result found for Configurations
      [+] DSCWeb01 has a valid Configurations Setting (!$null) 683ms
Tests completed in 13.51s
Tests Passed: 26, Failed: 0, Skipped: 0, Pending: 0, Inconclusive: 0
Done /./Test_ConfigData 00:00:18.2999831

===============================================================================
                        LOAD DATUM CONFIGDATA

-------------------------------------------------------------------------------
  /./Load_Datum_ConfigData
  C:\Users\JHP\OneDrive\Career\PowerShell_Book_Packt\dscworkshop\DscSample\.build\DSC\ConfigData.build.ps1:61

VERBOSE: Removing the imported "Unprotect-Datum" function.
VERBOSE: Removing the imported "Test-TestHandlerFilter" function.
VERBOSE: Removing the imported "Test-ProtectedDatumFilter" function.
VERBOSE: Removing the imported "Resolve-DatumPath" function.
VERBOSE: Removing the imported "Resolve-Datum" function.
VERBOSE: Removing the imported "Protect-Datum" function.
VERBOSE: Removing the imported "New-DatumStructure" function.
VERBOSE: Removing the imported "New-DatumFileProvider" function.
VERBOSE: Removing the imported "Merge-Datum" function.
VERBOSE: Removing the imported "Invoke-TestHandlerAction" function.
VERBOSE: Removing the imported "Invoke-ProtectedDatumAction" function.
VERBOSE: Removing the imported "Get-MergeStrategyFromPath" function.
VERBOSE: Removing the imported "Get-FileProviderData" function.
VERBOSE: Removing the imported "Get-DatumRsop" function.
VERBOSE: Removing the imported "gin" alias.
VERBOSE: Removing the imported "gcb" alias.
VERBOSE: Removing the imported "stz" alias.
VERBOSE: Removing the imported "scb" alias.
VERBOSE: Removing the imported "gtz" alias.
VERBOSE: Removing the imported "New-TemporaryFile" function.
VERBOSE: Removing the imported "New-Guid" function.
VERBOSE: Removing the imported "Import-PowerShellDataFile" function.
VERBOSE: Removing the imported "Get-FileHash" function.
VERBOSE: Removing the imported "Format-Hex" function.
VERBOSE: Removing the imported "ConvertFrom-SddlString" function.
VERBOSE: Removing the imported "fhx" alias.
VERBOSE: Removing the imported "CFS" alias.
VERBOSE: Removing the imported "Add-AssertionOperator" function.
VERBOSE: Removing the imported "BeforeAll" function.
VERBOSE: Removing the imported "Assert-VerifiableMocks" function.
VERBOSE: Removing the imported "Should" function.
VERBOSE: Removing the imported "Setup" function.
VERBOSE: Removing the imported "Set-TestInconclusive" function.
VERBOSE: Removing the imported "Set-DynamicParameterVariable" function.
VERBOSE: Removing the imported "SafeGetCommand" function.
VERBOSE: Removing the imported "New-PesterOption" function.
VERBOSE: Removing the imported "New-MockObject" function.
VERBOSE: Removing the imported "New-Fixture" function.
VERBOSE: Removing the imported "Mock" function.
VERBOSE: Removing the imported "It" function.
VERBOSE: Removing the imported "Invoke-Pester" function.
VERBOSE: Removing the imported "Invoke-Mock" function.
VERBOSE: Removing the imported "Invoke-Gherkin" function.
VERBOSE: Removing the imported "InModuleScope" function.
VERBOSE: Removing the imported "In" function.
VERBOSE: Removing the imported "GherkinStep" function.
VERBOSE: Removing the imported "Get-TestDriveItem" function.
VERBOSE: Removing the imported "Get-MockDynamicParameter" function.
VERBOSE: Removing the imported "Find-GherkinStep" function.
VERBOSE: Removing the imported "Describe" function.
VERBOSE: Removing the imported "Context" function.
VERBOSE: Removing the imported "BeforeEachScenario" function.
VERBOSE: Removing the imported "BeforeEachFeature" function.
VERBOSE: Removing the imported "BeforeEach" function.
VERBOSE: Removing the imported "AfterEach" function.
VERBOSE: Removing the imported "Assert-VerifiableMock" function.
VERBOSE: Removing the imported "AfterAll" function.
VERBOSE: Removing the imported "Assert-MockCalled" function.
VERBOSE: Removing the imported "AfterEachScenario" function.
VERBOSE: Removing the imported "AfterEachFeature" function.
VERBOSE: Removing the imported "But" alias.
VERBOSE: Removing the imported "And" alias.
VERBOSE: Removing the imported "When" alias.
VERBOSE: Removing the imported "Then" alias.
VERBOSE: Removing the imported "Given" alias.
VERBOSE: Removing the imported "ConvertTo-Yaml" function.
VERBOSE: Removing the imported "ConvertFrom-Yaml" function.
VERBOSE: Removing the imported "cty" alias.
VERBOSE: Removing the imported "cfy" alias.
VERBOSE: Removing the imported "Get-KeyEncryptionCertificate" function.
VERBOSE: Removing the imported "Add-ProtectedDataHmac" function.
VERBOSE: Removing the imported "Add-ProtectedDataCredential" function.
VERBOSE: Removing the imported "Unprotect-Data" function.
VERBOSE: Removing the imported "Remove-ProtectedDataCredential" function.
VERBOSE: Removing the imported "Protect-Data" function.
VERBOSE: Removing the imported "Get-ProtectedDataSupportedTypes" function.
VERBOSE: Loading module from path 'C:\Users\JHP\OneDrive\Career\PowerShell_Book_Packt\dscworkshop\DscSample\BuildOutput\Modules\ProtectedData\4.1.3\ProtectedData.psd1'.
VERBOSE: Populating RepositorySourceLocation property for module ProtectedData.
VERBOSE: Loading module from path 'C:\Users\JHP\OneDrive\Career\PowerShell_Book_Packt\dscworkshop\DscSample\BuildOutput\Modules\ProtectedData\4.1.3\ProtectedData.psm1'.
VERBOSE: Exporting function 'Protect-Data'.
VERBOSE: Exporting function 'Unprotect-Data'.
VERBOSE: Exporting function 'Add-ProtectedDataHmac'.
VERBOSE: Exporting function 'Add-ProtectedDataCredential'.
VERBOSE: Exporting function 'Remove-ProtectedDataCredential'.
VERBOSE: Exporting function 'Get-ProtectedDataSupportedTypes'.
VERBOSE: Exporting function 'Get-KeyEncryptionCertificate'.
VERBOSE: Exporting function 'ConvertTo-X509Certificate2'.
VERBOSE: Exporting function 'GetCertificateFromPSPath'.
VERBOSE: Exporting function 'GetCertificateByThumbprint'.
VERBOSE: Exporting function 'Protect-DataWithAes'.
VERBOSE: Exporting function 'Get-Hmac'.
VERBOSE: Exporting function 'Unprotect-DataWithAes'.
VERBOSE: Exporting function 'Assert-ValidHmac'.
VERBOSE: Exporting function 'ByteArraysAreEqual'.
VERBOSE: Exporting function 'Add-KeyData'.
VERBOSE: Exporting function 'Unprotect-MatchingKeyData'.
VERBOSE: Exporting function 'ValidateKeyEncryptionCertificate'.
VERBOSE: Exporting function 'TestPrivateKey'.
VERBOSE: Exporting function 'Get-KeyGenerator'.
VERBOSE: Exporting function 'Get-PasswordHash'.
VERBOSE: Exporting function 'Get-RandomBytes'.
VERBOSE: Exporting function 'Protect-KeyDataWithCertificate'.
VERBOSE: Exporting function 'Protect-KeyDataWithRsaCertificate'.
VERBOSE: Exporting function 'Protect-KeyDataWithEcdhCertificate'.
VERBOSE: Exporting function 'Get-EcdhPublicKey'.
VERBOSE: Exporting function 'Get-AlgorithmOid'.
VERBOSE: Exporting function 'DecodeBinaryOid'.
VERBOSE: Exporting function 'Unprotect-KeyDataWithCertificate'.
VERBOSE: Exporting function 'Unprotect-KeyDataWithEcdhCertificate'.
VERBOSE: Exporting function 'Unprotect-KeyDataWithRsaCertificate'.
VERBOSE: Exporting function 'DecryptRsaData'.
VERBOSE: Exporting function 'Protect-KeyDataWithPassword'.
VERBOSE: Exporting function 'Unprotect-KeyDataWithPassword'.
VERBOSE: Exporting function 'ConvertTo-PinnedByteArray'.
VERBOSE: Exporting function 'ConvertFrom-ByteArray'.
VERBOSE: Exporting function 'Convert-StringToPinnedByteArray'.
VERBOSE: Exporting function 'Convert-SecureStringToPinnedByteArray'.
VERBOSE: Exporting function 'Convert-PSCredentialToPinnedByteArray'.
VERBOSE: Exporting function 'Convert-ByteArrayToString'.
VERBOSE: Exporting function 'Convert-ByteArrayToSecureString'.
VERBOSE: Exporting function 'Convert-ByteArrayToPSCredential'.
VERBOSE: Exporting function 'Test-IsProtectedData'.
VERBOSE: Exporting function 'Test-IsKeyData'.
VERBOSE: Exporting function 'Test-IsPasswordProtectedKeyData'.
VERBOSE: Exporting function 'Test-IsCertificateProtectedKeyData'.
VERBOSE: Importing function 'Add-ProtectedDataCredential'.
VERBOSE: Importing function 'Add-ProtectedDataHmac'.
VERBOSE: Importing function 'Get-KeyEncryptionCertificate'.
VERBOSE: Importing function 'Get-ProtectedDataSupportedTypes'.
VERBOSE: Importing function 'Protect-Data'.
VERBOSE: Importing function 'Remove-ProtectedDataCredential'.
VERBOSE: Importing function 'Unprotect-Data'.
VERBOSE: Loading module from path 'C:\Users\JHP\OneDrive\Career\PowerShell_Book_Packt\dscworkshop\DscSample\BuildOutput\Modules\PowerShell-Yaml\0.3.4\PowerShell-Yaml.psd1'.
VERBOSE: Populating RepositorySourceLocation property for module PowerShell-Yaml.
VERBOSE: Loading module from path 'C:\Users\JHP\OneDrive\Career\PowerShell_Book_Packt\dscworkshop\DscSample\BuildOutput\Modules\PowerShell-Yaml\0.3.4\Load-Assemblies.ps1'.
VERBOSE: Dot-sourcing the script file 'C:\Users\JHP\OneDrive\Career\PowerShell_Book_Packt\dscworkshop\DscSample\BuildOutput\Modules\PowerShell-Yaml\0.3.4\Load-Assemblies.ps1'.
VERBOSE: Loading module from path 'C:\Users\JHP\OneDrive\Career\PowerShell_Book_Packt\dscworkshop\DscSample\BuildOutput\Modules\PowerShell-Yaml\0.3.4\powershell-yaml.psm1'.
VERBOSE: Importing function 'ConvertFrom-Yaml'.
VERBOSE: Importing function 'ConvertTo-Yaml'.
VERBOSE: Importing alias 'cfy'.
VERBOSE: Importing alias 'cty'.
VERBOSE: Loading module from path 'C:\Users\JHP\OneDrive\Career\PowerShell_Book_Packt\dscworkshop\DscSample\BuildOutput\Modules\Datum\0.0.32\Datum.psd1'.
VERBOSE: Populating RepositorySourceLocation property for module Datum.
VERBOSE: Loading module from path 'C:\Users\JHP\OneDrive\Career\PowerShell_Book_Packt\dscworkshop\DscSample\BuildOutput\Modules\Datum\0.0.32\ScriptsToProcess\Get-DscSplattedResource.ps1'.
VERBOSE: Dot-sourcing the script file 'C:\Users\JHP\OneDrive\Career\PowerShell_Book_Packt\dscworkshop\DscSample\BuildOutput\Modules\Datum\0.0.32\ScriptsToProcess\Get-DscSplattedResource.ps1'.
VERBOSE: Loading module from path 'C:\Users\JHP\OneDrive\Career\PowerShell_Book_Packt\dscworkshop\DscSample\BuildOutput\Modules\Datum\0.0.32\ScriptsToProcess\Resolve-NodeProperty.ps1'.
VERBOSE: Dot-sourcing the script file 'C:\Users\JHP\OneDrive\Career\PowerShell_Book_Packt\dscworkshop\DscSample\BuildOutput\Modules\Datum\0.0.32\ScriptsToProcess\Resolve-NodeProperty.ps1'.
VERBOSE: Loading module from path 'C:\Users\JHP\OneDrive\Career\PowerShell_Book_Packt\dscworkshop\DscSample\BuildOutput\Modules\Datum\0.0.32\Datum.psm1'.
VERBOSE: Exporting function 'Compare-Hashtable'.
VERBOSE: Exporting function 'ConvertTo-Datum'.
VERBOSE: Exporting function 'Get-DatumType'.
VERBOSE: Exporting function 'Get-MergeStrategyFromString'.
VERBOSE: Exporting function 'Merge-DatumArray'.
VERBOSE: Exporting function 'Merge-Hashtable'.
VERBOSE: Exporting function 'Get-DatumRsop'.
VERBOSE: Exporting function 'Get-FileProviderData'.
VERBOSE: Exporting function 'Get-MergeStrategyFromPath'.
VERBOSE: Exporting function 'Invoke-ProtectedDatumAction'.
VERBOSE: Exporting function 'Invoke-TestHandlerAction'.
VERBOSE: Exporting function 'Merge-Datum'.
VERBOSE: Exporting function 'New-DatumFileProvider'.
VERBOSE: Exporting function 'New-DatumStructure'.
VERBOSE: Exporting function 'Protect-Datum'.
VERBOSE: Exporting function 'Resolve-Datum'.
VERBOSE: Exporting function 'Resolve-DatumPath'.
VERBOSE: Exporting function 'Test-ProtectedDatumFilter'.
VERBOSE: Exporting function 'Test-TestHandlerFilter'.
VERBOSE: Exporting function 'Unprotect-Datum'.
VERBOSE: Importing function 'Get-DatumRsop'.
VERBOSE: Importing function 'Get-FileProviderData'.
VERBOSE: Importing function 'Get-MergeStrategyFromPath'.
VERBOSE: Importing function 'Invoke-ProtectedDatumAction'.
VERBOSE: Importing function 'Invoke-TestHandlerAction'.
VERBOSE: Importing function 'Merge-Datum'.
VERBOSE: Importing function 'New-DatumFileProvider'.
VERBOSE: Importing function 'New-DatumStructure'.
VERBOSE: Importing function 'Protect-Datum'.
VERBOSE: Importing function 'Resolve-Datum'.
VERBOSE: Importing function 'Resolve-DatumPath'.
VERBOSE: Importing function 'Test-ProtectedDatumFilter'.
VERBOSE: Importing function 'Test-TestHandlerFilter'.
VERBOSE: Importing function 'Unprotect-Datum'.
Loading Datum Definition from 'C:\Users\JHP\OneDrive\Career\PowerShell_Book_Packt\dscworkshop\DscSample\DSC_ConfigData\Datum.yml'
Node count: 2
Filter:
Node count after applying filter: 2
Done /./Load_Datum_ConfigData 00:00:03.4250034

===============================================================================
                        COMPILE DATUM RSOP

-------------------------------------------------------------------------------
  /./Compile_Datum_Rsop
  C:\Users\JHP\OneDrive\Career\PowerShell_Book_Packt\dscworkshop\DscSample\.build\DSC\ConfigData.build.ps1:118

Generating RSOP output for 2 nodes
WARNING: Cannot merge different types REF:[baseType] | DIFF:[baseType_array]System.Object[] , returning most specific Datum.
VERBOSE:        Result found for Configurations
VERBOSE:        Result found for FilesAndFolders
ERROR: Exception calling "Serialize" with "2" argument(s): "Too much recursion when traversing the object graph"
At C:\Users\JHP\OneDrive\Career\PowerShell_Book_Packt\dscworkshop\DscSample\.build\DSC\ConfigData.build.ps1:140 char:21
+ ... $nodeRSOP | Convertto-Yaml -OutFile (Join-Path -Path $rsopOutputPathV ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
At C:\Users\JHP\OneDrive\Career\PowerShell_Book_Packt\dscworkshop\DscSample\.build\DSC\ConfigData.build.ps1:118 char:1
+ task Compile_Datum_Rsop {
+ ~~~~~~~~~~~~~~~~~~~~~~~~~
At C:\Users\JHP\OneDrive\Career\PowerShell_Book_Packt\dscworkshop\DscSample\.build.ps1:204 char:5
+     task . Clean_BuildOutput,
+     ~~~~~~~~~~~~~~~~~~~~~~~~~
Build FAILED. 6 tasks, 1 errors, 0 warnings 00:00:25.2509625
Exception calling "Serialize" with "2" argument(s): "Too much recursion when traversing the object graph"
At C:\Users\JHP\OneDrive\Career\PowerShell_Book_Packt\dscworkshop\DscSample\.build\DSC\ConfigData.build.ps1:140 char:21
+ ... $nodeRSOP | Convertto-Yaml -OutFile (Join-Path -Path $rsopOutputPathV ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [ConvertTo-Yaml], MethodInvocationException
    + FullyQualifiedErrorId : InvalidOperationException,ConvertTo-Yaml
PS C:\Users\JHP\OneDrive\Career\PowerShell_Book_Packt\dscworkshop\DscSample>

Node environment is not determined

Problem description

The expression [x={ $File.Directory.BaseName } =] does not determine node environment.

Verbose logs

null

How to reproduce

# source/AllNodes/Stage/server1.yml
NodeName: '[x={ $Node.Name }=]'
Environment: '[x={ $File.Directory.BaseName } =]'
Role: Webserver
Description: '[x= "$($Node.Role) in $($Node.Environment)" =]'
Location: DataCenter

Expected behavior

ParentFolderName of node yml file is set as node environment.

Current behavior

Describing Node Definition Files
 Context Testing for conflicts / duplicate data
   [+] Should not have duplicate node names 10ms (2ms|8ms)
  [+] 'server1.dev.de' has valid yaml 24ms (21ms|3ms)
  [!] 'server1.dev.de' is in the right environment is skipped, because Environment for 'server1.dev.de' is either not set or like '[x=*' 32ms (29ms|3ms)
  [+] Location of 'server1.dev.de' is 'DataCenter' and does exist 8ms (6ms|1ms)
  [!] Environment of 'server1.dev.de' is '[x={ $File.Directory.BaseName } =]' and does exist is skipped, because Environment for 'server1.dev.de' is either not set or like '[x=*' 5ms (4ms|1ms)
  [+] Role of 'server1.dev.de' is 'Webserver' and does exist 15ms (7ms|8ms)
  [!] Baseline of 'server1.dev.de' is '' and does exist is skipped, because Baseline for 'server1.dev.de' is not set 5ms (4ms|1ms) 

Suggested solution

null

Operating system the target node is running

OsName               : Microsoft Windows 10 Enterprise        
OsOperatingSystemSKU : EnterpriseEdition
OsArchitecture       : 64-bit
WindowsVersion       : 2009
WindowsBuildLabEx    : 19041.1.amd64fre.vb_release.191206-1406
OsLanguage           : en-US
OsMuiLanguages       : {en-US}

PowerShell version and build the target node is running

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

Module version used

null

Update Path in .md for new exectuion Paths

  1. Execute & '.\Lab\10 HyperV Full Lab with DSC and TFS' on Hyper-V or & '.\Lab\10 Azure Full Lab with DSC and TFS Azure.ps1' if you prefer to use Azure

is the new updated code for the 01 AutomatedLab.md Line: 47

Issues with Depends on

In the following Example:

Disks:
  Disks:
    - DiskId: 2
      DiskIdType: Number
      DriveLetter: F
      PartitionStyle: GPT
      FSFormat: NTFS

FilesAndFolders:
  Items:
    - DestinationPath: F:\ReleaseA\Admin
      Type: Directory
      Ensure: Present
      DependsOn: '[Disk]2'

DependsOn: '[Disk]2' Throws an error and the resource seems to be malformed? Perhaps this is just user error?

.gitattributes File Type Setting can introduce encoding errors in Output/RequiredModules

I had a wired encoding bug with some .psm1 Files in the Output/RequiredModules directory if i had to reinclude them into the repository.
After committing those files the content got scrambled with invisible and strange Unicode characters which broke their functionality
This happened sometimes but not always. In my case the issue was with the DSCBuildHelpers Module.

I found out that the issue only happens if the PowerShell File has UTF16le encoding and the file gets treated as text by git.
Currently the .gitattributes file declares everything as text

* text eol=autocrlf

and overwrites this for some file extensions.
As far as i understand git uses UTF8 internally and when you commit a file which is configured as text it converts it. After that you'll see the encoding errors.
The git default behaviour for a UTF16le file is to treat it as a binary and that way it stays as it should be.
Other PowerShell files encodings are recognised as text.

Why is this an issue
Sometimes you need a custom version of a required module or you have a niche Azure Dev Ops Server Configuration where you can not use the Azure Dev Ops Artifactory Feed.

Proposal
Remove the everything is text declaration or restrict it to the parts where we are in encoding control like /source/** text eol=autocrlf

Repro Steps

  1. Create a PowerShell File with UTF16 le encoding.
  2. Commit the file
  3. Push the commit
  4. Git clone the repository to a different location
  5. Change the file contents at the different location
  6. Commit and push again
  7. Pull at the original location

Build.ps1 does not build a freshly cloned repo

Problem description

Build.ps1 -ResolveDependency does not build a freshly cloned repo

Verbose logs

Verbose output is too long for GitHub. Pasting only the last portion which ran into the error.

===============================================================================
                        COMPILEDATUMRSOP

-------------------------------------------------------------------------------
  /./build/CompileDatumRsop
  D:\tmp\DscWorkshop\output\RequiredModules\Sampler.DscPipeline\0.1.1\tasks\CompileDatumRsop.build.ps1:39

        Project Name               = ''
        Source Path                = 'source'
        Output Directory           = 'D:\tmp\DscWorkshop\output'
        Release Notes path         = 'D:\tmp\DscWorkshop\output\ReleaseNotes.md'
        Built Module Subdirectory  = 'D:\tmp\DscWorkshop\output\AvoidPSPathOverlap'
        Module Manifest Path (src) = 'C:\Users\janhe\source\.psd1'
VERBOSE: Module version is not determined yet. Evaluating methods to get module version.
VERBOSE: GitVersion is not installed. Trying to use the version from module manifest in path 'C:\Users\janhe\source\.psd1'.
ERROR: Cannot find path 'C:\Users\janhe\source\.psd1' because it does not exist.
At C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules\Microsoft.PowerShell.Utility\Microsoft.PowerShell.Utility.psm1:544 char:35
+         foreach($resolvedPath in (Resolve-Path @PSBoundParameters))
+                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
At D:\tmp\DscWorkshop\output\RequiredModules\Sampler.DscPipeline\0.1.1\tasks\CompileDatumRsop.build.ps1:39 char:1
+ task CompileDatumRsop {
+ ~~~~~~~~~~~~~~~~~~~~~~~
At D:\tmp\DscWorkshop\build.ps1:331 char:13
+             task $workflow $workflowItem
+             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
At D:\tmp\DscWorkshop\build.ps1:331 char:13
+             task $workflow $workflowItem
+             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Build FAILED. 7 tasks, 1 errors, 0 warnings 00:00:14.2525590
Resolve-Path : Cannot find path 'C:\Users\janhe\source\.psd1' because it does not exist.
At C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules\Microsoft.PowerShell.Utility\Microsoft.PowerShell.Utility.psm1:544 char:35
+         foreach($resolvedPath in (Resolve-Path @PSBoundParameters))
+                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (C:\Users\janhe\source\.psd1:String) [Resolve-Path], ItemNotFoundException
    + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.ResolvePathCommand

[00:19:30]PS /> $pwd

Path
----
D:\tmp\DscWorkshop

How to reproduce

$VerbosePreference = 'Continue'
git clone [email protected]:dsccommunity/DscWorkshop.git
cd DscWorkshop
.\Build.ps1 -ResolveDependency

Expected behavior

Freshly cloned main branch should always build successfully.

Current behavior

Build.ps1 -ResolveDependency does not build a freshly cloned repo

Suggested solution

None. The build process has become too complex to troubleshoot since migrating to Sampler.

Operating system the target node is running

OsName               : Microsoft Windows 11 Pro
OsOperatingSystemSKU : 48
OsArchitecture       : 64-bit
WindowsVersion       : 2009
WindowsBuildLabEx    : 22000.1.amd64fre.co_release.210604-1628
OsLanguage           : en-US
OsMuiLanguages       : {en-US, de-DE, en-GB}

PowerShell version and build the target node is running

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

Module version used

???
CommonTasks2 is not a module and does not exist. The code in use was the latest commit in the main branch:

[00:00:01]PS /> git status
On branch main
Your branch is up to date with 'origin/main'.

nothing to commit, working tree clean
[00:00:00]PS /> git log -n 1 --oneline
274d7ef (HEAD -> main, origin/main, origin/HEAD) Migration to sampler (#121)

Azure DevOps Automation breaks on MOF Upload if server name contains hyphen

Our server names contain hyphens. This breaks the Azure DevOps automation in a specific way. When the release pipeline script is triggered, that uploads the MOF files to Azure, then you'll run into an error (that doesn't stop execution).

2021-09-01T12:12:35.2831940Z VERBOSE: Performing the operation "Import" on target "D:\a\r1\a\_Windows Server DSC-CI\MOF\server-xyz-123.mof".
2021-09-01T12:13:06.5410128Z Import-AzureRmAutomationDscNodeConfiguration : Long running operation failed with status 'NotFound'.

The error message is misleading. What actually causes the error can only be found out when uploading the mof file in the Azure portal:

image

I haven't found an easy workaround for this, because the configuration name is derived from the mof's filename exactly at this line of the automation script:

# […]
Import-AzureRmAutomationDscNodeConfiguration -ResourceGroupName $env:ResourceGroupName -AutomationAccountName $env:AutomationAccountName -Path $config.FullName -ConfigurationName $config.BaseName -Verbose -Force
# […]

So changing the ConfigurationNames in the node's YAML doesn't actually fix the problem.

NodeName: server-xyz-123
Environment: Prod
Location: Frankfurt

# […]

LcmConfig:
  ConfigurationRepositoryWeb:
    Server:
      # ConfigurationNames: server-xyz-123.server-xyz-123 # BEFORE
      ConfigurationNames: serverxyz123.server-xyz-123 # AFTER, no fix

Is there a fix for this that I do not see?

Non-terminating errors while building 03 Full Lab with DSC and TFS.ps1

15:16:27|00:39:28|00:00:00.000| - Installing Certificate Servers
15:16:27|00:39:28|00:00:00.000| - Machines with Root CA role to be installed: 'DSCCASQL01'
15:16:27|00:39:28|00:00:00.005| - Waiting for machines to start up..
15:16:55|00:39:55|00:00:27.712| - Waiting for Root CA(s) to complete installation.....
15:17:25|00:40:26|00:00:58.597| - Publishing certificates from CA servers to all online machines....
15:17:49|00:40:50|00:01:22.473| - Finished installation of Root CAs
15:17:49|00:40:50|00:01:22.552| - Done
15:17:57|00:40:57|00:40:39.910| - .......
15:19:24|00:42:25|00:00:00.001| - Installing DSC Pull Servers
15:19:24|00:42:25|00:00:00.045| - Starting Pull Servers and waiting until they are ready..
15:19:30|00:42:30|00:00:05.436| - Routing Role detected, installing DSC in online mode.
15:19:45|00:42:46|00:00:20.895| - All DSC Pull Servers can reach the internet.
15:19:45|00:42:46|00:00:21.168| - Waiting for machines to startup..
15:19:53|00:42:54|00:00:00.000| - Executing lab command activity: 'Duplicating CA template WebServer -> DscPullSsl' on machines 'DSCCASQL01'
15:19:53|00:42:54|00:00:00.011| - Waiting for completion
15:19:57|00:42:58|00:00:04.162| - Activity done
15:20:08|00:43:09|00:00:00.000| - Executing lab command activity: 'Publishing CA template DscPullSsl' on machines 'DSCCASQL01'
15:20:08|00:43:09|00:00:00.007| - Waiting for completion
15:20:09|00:43:10|00:00:00.661| - Activity done
15:20:11|00:43:11|00:00:00.000| - Executing lab command activity: 'Duplicating CA template CEPEncryption -> DscMofEncryption' on machines 'DSCCASQL01'
15:20:11|00:43:11|00:00:00.005| - Waiting for completion
15:20:14|00:43:15|00:00:03.587| - Activity done
15:20:25|00:43:26|00:00:00.000| - Executing lab command activity: 'Publishing CA template DscMofEncryption' on machines 'DSCCASQL01'
15:20:25|00:43:26|00:00:00.006| - Waiting for completion
15:20:26|00:43:27|00:00:00.801| - Activity done
15:20:26|00:43:27|00:00:00.000| - Executing lab command activity: 'Setup Dsc Pull Server 1' on machines 'DSCPULL01'
15:20:26|00:43:27|00:00:00.005| - Activity started in background
15:20:32|00:43:32|00:01:07.389| - Activity started in background
15:22:03|00:45:03|00:00:00.000| - Installing software package 'G:\LabSources\SoftwarePackages\AccessDatabaseEngine.exe' on machines 'DSCPULL01'
15:22:03|00:45:03|00:00:00.078| - Copying files and initiating setup on 'DSCPULL01' and waiting for completion..
15:22:14|00:45:15|00:00:11.868| - Installation done
15:22:15|00:45:16|00:00:00.000| - Executing lab command activity: 'Requesting certificate for template 'DscMofEncryption'' on machines 'DSCPULL01'
15:22:15|00:45:16|00:00:00.006| - Waiting for completion
15:22:17|00:45:18|00:00:01.799| - Activity done
15:22:18|00:45:19|00:00:00.000| - Executing lab command activity: 'Requesting certificate for template 'DscPullSsl'' on machines 'DSCPULL01'
15:22:18|00:45:19|00:00:00.011| - Waiting for completion
15:22:19|00:45:20|00:00:00.688| - Activity done
15:22:19|00:45:20|00:00:00.000| - Executing lab command activity: 'Setting up DSC Pull Server on 'DSCPULL01'' on machines 'DSCPULL01'
15:22:19|00:45:20|00:00:00.011| - Activity started in background
15:22:19|00:45:20|00:45:02.490| - Activity started in background
15:22:19|00:45:20|00:45:08.434| Waiting for configuration of DSC Pull Server to complete....
15:22:48|00:45:48|00:45:36.792| Waiting for installation of IIS web admin tools to complete
Method invocation failed because [System.Collections.Generic.List`1[[AutomatedLab.Disk, AutomatedLab, Version=5.0.3.27, Culture=neutral, PublicKeyToken=null]]] does not contain a method named 'Export'.
At C:\Program Files\WindowsPowerShell\Modules\AutomatedLab\5.0.3.27\AutomatedLab.psm1:616 char:5

  • $lab.Disks.Export($lab.DiskDefinitionFiles[0].Path)
    
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : MethodNotFound

Method invocation failed because [System.Collections.Generic.List`1[[AutomatedLab.Disk, AutomatedLab, Version=5.0.3.27, Culture=neutral, PublicKeyToken=null]]] does not contain a method named 'AddFromFile'.
At C:\Program Files\WindowsPowerShell\Modules\AutomatedLab\5.0.3.27\AutomatedLab.psm1:622 char:5

  • $lab.Disks.AddFromFile($lab.DiskDefinitionFiles[0].Path)
    
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : MethodNotFound

15:22:52|00:45:53|00:45:41.680| Done
15:22:52|00:45:53|00:00:00.000| Installing SQL Servers
15:22:53|00:45:53|00:00:00.057| - Machines to have SQL Server 2017 installed: 'DSCCASQL01'
15:22:53|00:45:53|00:00:00.134| - Starting machines 'DSCCASQL01'..
15:23:08|00:46:09|00:00:15.463| - Waiting for pre-requisite .Net 3.5 Framework to finish installation on machines 'DSCCASQL01'......Done
15:25:24|00:48:25|00:02:31.441| - Waiting for installation of SQL server to complete on machines 'DSCCASQL01'...............
15:30:54|00:53:55|00:08:01.611| - All SQL Servers 'DSCCASQL01' have now been installed and restarted. Waiting for these to be ready...
15:30:58|00:53:59|00:08:05.919| - Installing SQL Server Management Studio on 'DSCCASQL01' in the background.
15:31:05|00:54:06|00:08:12.708| - Waiting for SQL Server Management Studio installation jobs to finish.........
15:34:43|00:57:44|00:11:50.928| - Done
15:34:43|00:57:44|00:00:00.000| Installing Web Servers
15:34:43|00:57:44|00:00:00.010| - Machines to have Web Server role installed: 'DSCPULL01, DSCWeb01, DSCWeb02'
15:34:43|00:57:44|00:00:00.055| - Waiting for machines to start up.....
15:35:52|00:58:53|00:01:08.717| - Waiting for Web Server role to complete installation......
15:38:33|01:01:34|00:03:50.048| - Done
15:38:34|01:01:34|00:00:00.000| Installing Team Foundation Server environment
15:38:34|01:01:34|00:00:00.015| Machines to have TFS or the build agent installed: 'DSCPULL01, DSCTFS01'
15:38:42|01:01:43|00:00:08.346| .......
15:40:22|01:03:23|00:01:48.330| ....
15:41:27|01:04:27|00:00:00.000| Waiting for job(s) to complete with ID(s): 654

Cannot find Operating System using eval iso

The ISO used is 14393.0.161119-1705.RS1_REFRESH_SERVER_EVAL_X64FRE_EN-US

The error is
image

  • Can you please check the OS build your are running the deployment on?
  • Can you mount the ISO using the Windows Explorer?
  • Have you tried pointing Get-LabAvailableOperatingSystem directory to that image using the Path parameter?
  • Get-LabAvailableOperatingSystem should at least return one OS.

@Outek, FYI

SQL Reporting should report nodes that are no longer active

Sometimes the LCM is no longer active on some nodes. It does no longer update the configuration with the pull server nor apply the configuration locally. The SQL report should make these nodes visible that have not communicated over a certain amount of time.

Build breaks if I decide to not use environments and locations

I chose not to use environments and locations.

I deleted all environment and location YAML files and removed the keys from my node. I moved the node to the AllNodes folder, not into one of the environment subfolders.

image

The error is:

===============================================================================
                        TESTCONFIGDATA

-------------------------------------------------------------------------------
  /./TestConfigData
  C:\Users\daniel\source\repos\Windows Server DSC\DSC\Build\Tasks\TestConfigData.ps1:1

testResultsPath is: C:\Users\daniel\source\repos\Windows Server DSC\DSC\BuildOutput\IntegrationTestResults.xml
testsPath is: C:\Users\daniel\source\repos\Windows Server DSC\DSC\Tests
BuildOutput is: C:\Users\daniel\source\repos\Windows Server DSC\DSC\BuildOutput
Node count: 1
    [-] 'DSCFile01' is in the right environment 39ms
      Expected $true, but got $false.
      70:             $pathElements -contains $node.Environment | Should Be $true
      at <ScriptBlock>, C:\Users\daniel\source\repos\Windows Server DSC\DSC\Tests\ConfigData\ConfigData.Tests.ps1: line 70
    [-] Location of 'DSCFile01' is '' and does exist 41ms
      Expected $true, but got $false.
      75:             $node.Location -in $locations | Should Be $true
      at <ScriptBlock>, C:\Users\daniel\source\repos\Windows Server DSC\DSC\Tests\ConfigData\ConfigData.Tests.ps1: line 75
    [-] Environment of 'DSCFile01' is '' and does exist 27ms
      Expected $true, but got $false.
      80:             $node.Environment -in $environments | Should Be $true
      at <ScriptBlock>, C:\Users\daniel\source\repos\Windows Server DSC\DSC\Tests\ConfigData\ConfigData.Tests.ps1: line 80
Tests completed in 1.32s
Tests Passed: 12, Failed: 3, Skipped: 0, Pending: 0, Inconclusive: 0
ERROR: Assertion failed.
At C:\Users\daniel\source\repos\Windows Server DSC\DSC\Build\Tasks\TestConfigData.ps1:19 char:5
+     assert ($testResults.FailedCount -eq 0)
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
At C:\Users\daniel\source\repos\Windows Server DSC\DSC\Build\Tasks\TestConfigData.ps1:1 char:1
+ task TestConfigData {
+ ~~~~~~~~~~~~~~~~~~~~~
At C:\Users\daniel\source\repos\Windows Server DSC\DSC\Build.ps1:159 char:5
+     task . Init,
+     ~~~~~~~~~~~~
Build FAILED. 9 tasks, 1 errors, 0 warnings 00:04:07.2629572
assert : Assertion failed.
At C:\Users\daniel\source\repos\Windows Server DSC\DSC\Build\Tasks\TestConfigData.ps1:19 char:5
+     assert ($testResults.FailedCount -eq 0)
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [Assert-Build], Exception
    + FullyQualifiedErrorId : Assert-Build

RSOP does not contain consolidated LcmConfig data

When running the Build script, the RSOP output only contains the LcmConfig data that is included in the YAML file of the node itself. The data from the DscBaseline.yml file is missing:

LcmConfig:
Settings:
RefreshMode: Pull
RefreshFrequencyMins: 30
RebootNodeIfNeeded: true
ActionAfterReboot: ContinueConfiguration
AllowModuleOverwrite: true
#CertificateID: ...
ConfigurationMode: ApplyAndMonitor
ConfigurationModeFrequencyMins: 30
ConfigurationRepositoryWeb:
Server:
ServerURL: https://dscpull01.contoso.com:8080/PSDSCPullServer.svc
RegistrationKey: ec717ee9-b343-49ee-98a2-26e53939eecf
ReportServerWeb:
ServerURL: https://dscpull01.contoso.com:8080/PSDSCPullServer.svc
RegistrationKey: ec717ee9-b343-49ee-98a2-26e53939eecf

Example of DSCFile01.yml

  MaxLcmRuntime: 00:30:00
LcmConfig:
  ConfigurationRepositoryWeb:
    Server:
      ConfigurationNames: DSCFile01
PSDscAllowDomainUser: true

Would be great if these config items would also be included in the RSOP data.

CI Build Failing - Task 3 Exercise 2

I’m currently trying to do Task 3 – Exercise 2 in the DSC Workshop linked: https://github.com/dsccommunity/DscWorkshop/blob/dev/Exercises/Task3/Exercise2.md

After having followed all the steps and running the pipeline on the agent the build step is failing

This is the error I’m getting:

/./TestConfigData 
D:\a\1\s\DSC\Build\Tasks\TestConfigData.ps1:1 
testResultsPath is: D:\a\1\s\DSC\BuildOutput\IntegrationTestResults.xml 
testsPath is: D:\a\1\s\DSC\Tests 
BuildOutput is: D:\a\1\s\DSC\BuildOutput 
[-] Error occurred in test script 'D:\a\1\s\DSC\Tests\Acceptance\TestMofFiles.Tests.ps1' 0ms 
ParameterBindingValidationException: Cannot bind argument to parameter 'InputObject' because it is null. 
at Get-DatumNodesRecursive, D:\a\1\s\DSC\Build\DscHelpers\Get-DatumNodesRecursive.ps1: line 38 
at Get-DatumNodesRecursive, D:\a\1\s\DSC\Build\DscHelpers\Get-DatumNodesRecursive.ps1: line 41 
at Get-FilteredConfigurationData, D:\a\1\s\DSC\Build\DscHelpers\Get-FilteredConfigurationData.ps1: line 15 
at <ScriptBlock>, D:\a\1\s\DSC\Tests\Acceptance\TestMofFiles.Tests.ps1: line 8 
at <ScriptBlock>, D:\a\1\s\DSC\BuildOutput\Modules\Pester\4.10.1\Pester.psm1: line 1111 
at Invoke-Pester<End>, D:\a\1\s\DSC\BuildOutput\Modules\Pester\4.10.1\Pester.psm1: line 1137 
at <ScriptBlock>, D:\a\1\s\DSC\Build\Tasks\TestConfigData.ps1: line 17 
at *Task, D:\a\1\s\DSC\BuildOutput\Modules\InvokeBuild\5.6.0\Invoke-Build.ps1: line 530 
at *Task, D:\a\1\s\DSC\BuildOutput\Modules\InvokeBuild\5.6.0\Invoke-Build.ps1: line 503 
at <ScriptBlock><End>, D:\a\1\s\DSC\BuildOutput\Modules\InvokeBuild\5.6.0\Invoke-Build.ps1: line 690 
at <ScriptBlock>, D:\a\1\s\DSC\Build.ps1: line 129 
at <ScriptBlock>, D:\a\_temp\edf14524-3e7e-4d1a-8a47-18308a597759.ps1: line 3 
[-] Error occurred in test script 'D:\a\1\s\DSC\Tests\ConfigData\ConfigData.Tests.ps1' 0ms 
ParameterBindingValidationException: Cannot bind argument to parameter 'InputObject' because it is null. 
at Get-DatumNodesRecursive, D:\a\1\s\DSC\Build\DscHelpers\Get-DatumNodesRecursive.ps1: line 38 
at Get-DatumNodesRecursive, D:\a\1\s\DSC\Build\DscHelpers\Get-DatumNodesRecursive.ps1: line 41 
at Get-FilteredConfigurationData, D:\a\1\s\DSC\Build\DscHelpers\Get-FilteredConfigurationData.ps1: line 15 
at <ScriptBlock>, D:\a\1\s\DSC\Tests\ConfigData\ConfigData.Tests.ps1: line 8 
at <ScriptBlock>, D:\a\1\s\DSC\BuildOutput\Modules\Pester\4.10.1\Pester.psm1: line 1111 
at Invoke-Pester<End>, D:\a\1\s\DSC\BuildOutput\Modules\Pester\4.10.1\Pester.psm1: line 1137 
at <ScriptBlock>, D:\a\1\s\DSC\Build\Tasks\TestConfigData.ps1: line 17 
at *Task, D:\a\1\s\DSC\BuildOutput\Modules\InvokeBuild\5.6.0\Invoke-Build.ps1: line 530 
at *Task, D:\a\1\s\DSC\BuildOutput\Modules\InvokeBuild\5.6.0\Invoke-Build.ps1: line 503 
at <ScriptBlock><End>, D:\a\1\s\DSC\BuildOutput\Modules\InvokeBuild\5.6.0\Invoke-Build.ps1: line 690 
at <ScriptBlock>, D:\a\1\s\DSC\Build.ps1: line 129 
at <ScriptBlock>, D:\a\_temp\edf14524-3e7e-4d1a-8a47-18308a597759.ps1: line 3 
Tests completed in 3.17s 
Tests Passed: 0, Failed: 2, Skipped: 0, Pending: 0, Inconclusive: 0 
ERROR: Assertion failed. 
At D:\a\1\s\DSC\Build\Tasks\TestConfigData.ps1:19 char:5 
+ assert ($testResults.FailedCount -eq 0) 
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
At D:\a\1\s\DSC\Build\Tasks\TestConfigData.ps1:1 char:1 
+ task TestConfigData { 
+ ~~~~~~~~~~~~~~~~~~~~~ 
At D:\a\1\s\DSC\Build.ps1:156 char:5 
+ task . Init, 
+ ~~~~~~~~~~~~ 
Build FAILED. 8 tasks, 1 errors, 0 warnings 00:03:23.4742325 
assert : Assertion failed. 
At D:\a\1\s\DSC\Build\Tasks\TestConfigData.ps1:19 char:5 
+ assert ($testResults.FailedCount -eq 0) 
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
+ CategoryInfo : InvalidOperation: (:) [Assert-Build], Exception 
+ FullyQualifiedErrorId : Assert-Build 
##[error]PowerShell exited with code '1'. 
Finishing: Execute build.ps1 

I’ve played around and tweaked settings but still get the same error (I am running on dev branch), here are the current settings that the build is running on (exact as tutorial):

image

pic

Just wondering if this is something you are aware about and may already have a solution for.

Please explain a bit more how to start experimenting with '02 Intermediate Lab..' only

Waiting for AutomatedLab/AutomatedLab#402
Please elaborate how to make use of the intermediate stage

First, I wonder if it is set up right

PS I:\LabSources\SampleScripts\Introduction> invoke-labcommand {Get-DscLocalConfigurationManager} -comp DSCPULL01 -PassThru

17:19:11|03:00:18|00:00:00.000| - Executing lab command activity: '' on machines 'DSCPULL01'
17:19:11|03:00:18|00:00:00.010| - Waiting for completion
17:19:11|03:00:19|00:00:00.448| - Activity done

ActionAfterReboot : ContinueConfiguration
AgentId : 4B4664B5-794D-11E8-B7ED-0017FA000007
AllowModuleOverWrite : False
CertificateID :
ConfigurationDownloadManagers : {}
ConfigurationID :
ConfigurationMode : ApplyAndMonitor
ConfigurationModeFrequencyMins : 15
Credential :
DebugMode : {NONE}
DownloadManagerCustomData :
DownloadManagerName :
LCMCompatibleVersions : {1.0, 2.0}
LCMState : Idle
LCMStateDetail :
LCMVersion : 2.0
StatusRetentionTimeInDays : 10
SignatureValidationPolicy : NONE
SignatureValidations : {}
MaximumDownloadSizeMB : 500
PartialConfigurations :
RebootNodeIfNeeded : False
RefreshFrequencyMins : 30
RefreshMode : PUSH
ReportManagers : {}
ResourceModuleManagers : {}
PSComputerName : DSCPULL01
PSComputerName : DSCPULL01

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.