Skip to content

Instantly share code, notes, and snippets.

@gaelcolas
Created February 7, 2018 01:40
Show Gist options
  • Save gaelcolas/8de589d716ac92c649dfa6ba99d2d049 to your computer and use it in GitHub Desktop.
Save gaelcolas/8de589d716ac92c649dfa6ba99d2d049 to your computer and use it in GitHub Desktop.
foreach($Node in $ConfigurationData.AllNodes) {
# Retrieving the DSC Composite Resource name to include
$configurations = $ConfigurationData.Roles.($Node.Role).configurations
foreach($ConfigurationName in $configurations) {
$ConfigurationParameters = $ConfigurationData.Roles.($Node.Role).($ConfigurationName)
# Splat the Configuration Parameters defined in the Role to the Composite resource
&$ConfigurationName @ConfigurationParameters
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment