Script repository

Check whether one of the Boolean properties is set to true

Updated on: Jan 18, 2026, Views: 3074

Property validation

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.

    Got questions?

    Support Questions & Answers

    We use cookies to improve your experience.
    By your continued use of this site you accept such use.
    For more details please see our privacy policy and cookies policy.