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.
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