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 whether Password never expires account option is updated

February 24, 2021 Views: 1005

The script returns true if the Password never expires account option is being updated for the user. You can use the script in a business rule triggering Before creating a user or Before updating a user.

Edit Remove
PowerShell
if (-not($Context.IsPropertyModified("userAccountControl")))
{
    return
}

$itemMask = $Context.Action.PropertyList.GetPropertyItemMask("userAccountControl")
$Context.ConditionIsMet = $itemMask -band [Softerra.Adaxes.Interop.Adsi.PersistentObjects.ADS_USER_FLAG_ENUM]::ADS_UF_DONT_EXPIRE_PASSWD

Comments 0
Leave a comment
Loading...

Got questions?

Support Questions & Answers