Script repository
The script checks whether one of the Boolean properties is set to true. To execute the script, add the If PowerShell script returns true condition to a business rule, custom command or scheduled task configured for the required object type.
In the script, the $properties variable specifies the names of the Boolean properties to check.
$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
}
}
Comments 0
You must be signed in to comment.