This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Configuration MyDscConfig { | |
# Import the module that has the 'ServerType' configuration | |
Import-DscResource -ModuleName Platform | |
# Import the module that has the 'Application' Configuration | |
Import-DscResource -ModuleName Product | |
$ConfigurationData.AllNodes.Nodename { | |
$ConfigurationData.Roles.($Node.Role).configurations.Foreach{ | |
$ConfigurationName = $_ | |
$ConfigurationParameters = $ConfigurationData.Roles.($Node.Role).($ConfigurationName) | |
# This weird notation is to avoid scoping issues when invoking the DSC Composite Resource | |
(Get-DscSplattedResource -ResourceName $ConfigurationName -ExecutionName "$($ConfigurationName)_inc" -Properties $ConfigurationParameters -NoInvoke).Invoke($ConfigurationParameters) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment