Skip to content

Instantly share code, notes, and snippets.

@dlwyatt
Created October 30, 2014 15:35
Show Gist options
  • Save dlwyatt/e7dffc6b4c62428e8c70 to your computer and use it in GitHub Desktop.
Save dlwyatt/e7dffc6b4c62428e8c70 to your computer and use it in GitHub Desktop.
$configData = @{
AllNodes = @(
@{
NodeName = '*'
AllNodesProperty = 'AllNodesValue'
}
@{
NodeName = 'Node1'
FilterNumber = 1
CustomProperty = 'Node1Value'
}
@{
NodeName = 'Node2'
FilterNumber = 1
CustomProperty = 'Node2Value'
AllNodesProperty = 'Overridden'
}
@{
NodeName = 'Node3'
FilterNumber = 2
CustomProperty = 'Node3Value'
}
)
CustomConfigDataKey = 'CustomConfigDataValue'
}
configuration ExampleConfiguration
{
Write-Verbose -Verbose '$ConfigurationData:'
Write-Verbose -Verbose ($ConfigurationData | Out-String)
Write-Verbose -Verbose '$AllNodes:'
Write-Verbose -Verbose ($AllNodes | Out-String)
Write-Verbose -Verbose '$MyTypeName:'
Write-Verbose -Verbose ($MyTypeName | Out-String)
node $AllNodes.Where({$_.FilterNumber -eq 1}).NodeName
{
Write-Verbose -Verbose '$Node:'
Write-Verbose -Verbose ($Node | Out-String)
Write-Verbose -Verbose '$NodeName:'
Write-Verbose -Verbose ($NodeName | Out-String)
Write-Verbose -Verbose '$SelectedNodes:'
Write-Verbose -Verbose ($SelectedNodes | Out-String)
}
}
ExampleConfiguration -ConfigurationData $configData
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment