Hi,
Is it possible to set a depends on for a foreach loop, i.e i have a foreach loop dsc group resource
Node $AllNodes.Where{$_.Role -eq "IIS"}.NodeName
{
$Node.Groups.ForEach({
Group $_.Group
{
GroupName = $_.Group
Ensure ="Present"
MembersToInclude = $_.Members
Description = $_.Description
}
})
I then have another resource that is dependent on the foreach Group $._Group. I have set the depends on to
DependsOn =[Group]$_.Group
but this fails whith the error dependency doesn’t exist.
Thanks
Tom