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.

Script Repository

Check if the property is empty before modification

February 18, 2021 Views: 770

The script checks the property being modified and returns true if it is currently empty. The script should be executed in the If PowerShell script returns true condition in a business rule triggering Before updating a user.


  • $propertyName - Specifies the LDAP name of the property whose value will be checked.
Edit Remove
$propertyName = "employeeID" # TODO: modify me

    $currentValue = $Context.TargetObject.Get($propertyName)
    $currentValue = $NULL

$Context.ConditionIsMet = [System.String]::IsNullOrEmpty($currentValue)
Comments 0
Leave a comment

Got questions?

Support Questions & Answers