The script returns True if at least one of the specified Boolean properties is set to True. You can use the script in the If PowerShell script returns true condition in business rules, scheduled tasks and custom commands.
Parameter:
- $properties - Specifies LDAP names of properties that should be checked.
PowerShell
$properties = @("adm-CustomAttributeBoolean1", "adm-CustomAttributeBoolean2", "adm-CustomAttributeBoolean3") # TODO: modify me
$Context.ConditionIsMet = $False
foreach ($property in $properties)
{
try
{
$value = $Context.TargetObject.Get($property)
}
catch
{
continue
}
if ($value)
{
$Context.ConditionIsMet = $True
return
}
}