I’m trying to write a Configuration that can compile LCM settings for both push and pull mode nodes, something like this:
[DscLocalConfigurationManager()]
Configuration Lcm {
Node $AllNodes.NodeName {
Settings {
RefreshMode = $Node.RefreshMode
}
if ($Node.RepositoryURL) {
ConfigurationRepositoryWeb PullServer {
ServerURL = $Node.RepositoryURL
}
}
}
}
Lcm -ConfigurationData @{
AllNodes=@(
@{
NodeName=‘PUSHNODE’
RefreshMode=‘Push’
}
@{
NodeName=‘PULLNODE’
RefreshMode=‘Pull’
RepositoryURL=‘http://dsc.contoso.com/’
}
)
}
On my Windows 10 system with WMF 5.1, running this as is fails with DSC complaining that a repository needs to be set for pull mode. It will succeed if either one of the nodes is commented out, or if a repository URL is added to PUSHNODE. Is this a DSC bug?