Script Repository


Check whether Password never expires account option is updated

February 24, 2021
471

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 )
No results found.
Leave a comment