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