Script Repository


Check whether one of the properties is modified

February 24, 2021
1526

You can use the script in business rules, custom commands and scheduled tasks to verify whether one of the properties is modified. The script returns True if modification of at least one of the properties occurs. To add it to your rule, command or task, use the If PowerShell script returns true condition.

Parameter:

  • $properties - Specifies LDAP display names of the properties that need to be modified.
Edit Remove
PowerShell
$properties = @("givenName", "sn", "description", "department") # TODO: modify me

function IsPropertiesModified($properties)
{
    foreach ($propertyName in $properties)
    {
        if ($Context.IsPropertyModified($propertyName))
        {
            return $True
        }
    }
    
    return $False
}

$Context.ConditionIsMet = IsPropertiesModified $properties


Comments ( 0 )
No results found.
Leave a comment