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

Popular posts from this blog

cookies - Yii2 Advanced - Share session between frontend and mainsite (duplicate of frontend for www) -

angular - password and confirm password field validation angular2 reactive forms -

php - Permission denied. Laravel linux server -