powershell - How to use "*" in nodeName -
say have 2 roles in dsc setup , have variable amount of nodes in setup:
$configdata = @{ allnodes = @( @{ nodename = "*web*" # < problem lies here # can prodweb## or devweb## role = "iis", "basic" } @{ nodename = "*" role = "basic" } ) }
dsc resource:
configuration cfg { $allnodes.where{ $_.role.contains("basic") }.nodename { ... } $allnodes.where{ $_.role.contains("iis") }.nodename { ... } }
can achieve that?
the allnodes entry in configuration data array of hashtables. each hashtable needs have key nodename. value substituted when expression evaluates. nodename web* not work
Comments
Post a Comment