Hello,
First of all, there is no need to use scripts. You can just use the dedicated condition. For example:
If you still prefer using a script, you can use the below one. In the script, the $groupDNs variable specifies distinguished names (DNs) of the groups to check. For information on how to get an object DN, see https://adaxes.com/sdk/HowDoI.GetDnOfObject.
$groupDNs = @("CN=gr_1,OU=Groups,DC=compay,DC=com", "CN=gr_2,OU=Groups,DC=compay,DC=com", "CN=gr_3,OU=Groups,DC=compay,DC=com", "CN=gr_4,OU=Groups,DC=compay,DC=com")
$Context.ConditionIsMet = $False
foreach ($groupDN in $groupDNs)
{
$group = $Context.BindToObjectByDN($groupDN)
if($group.IsMember($Context.TargetObject.AdsPath))
{
$Context.ConditionIsMet = $True
return
}
}