IAdmAccountPasswordExpirationCondition

The IAdmAccountPasswordExpirationCondition interface represents the If account/password <expiration status> condition.

Inheritance: IAdmCondition

Properties

  • Property

  • Description

  • ExpirationType

  • Gets or sets a value indicating whether the condition should check for account or password expiration.

  • ExpirationOperator

  • Gets or sets the expiration operator for the condition.

  • PeriodOperator

  • Gets or sets the period comparison operator for the condition.

  • PeriodValue

  • Gets or sets the expiration period value, in days.

Details

ExpirationType

Gets or sets a value indicating whether the condition should check for account or password expiration.


ExpirationOperator

Gets or sets the expiration operator for the condition. For example, has expired or expires in N days.


PeriodOperator

Gets or sets the period comparison operator for the condition. This property should be used only with the ADM_EXPIRATIONOPERATOR_WILLEXPIRE or ADM_EXPIRATIONOPERATOR_EXPIRED expiration operators.


PeriodValue

Gets or sets the expiration period value, in days. This property should be used only with the ADM_EXPIRATIONOPERATOR_WILLEXPIRE or ADM_EXPIRATIONOPERATOR_EXPIRED expiration operators.

  • Type:
  • int
  • Access:
  • Read/Write

Examples

The following code sample creates a condition that returns true if the account has expired more than 30 days ago.

PowerShell
# The $actionSet variable refers to an action set in a
# business rule, custom command, or scheduled task.

# Create condition.
$condition = $actionSet.Conditions.CreateEx("adm-AccountPasswordExpirationCondition")
$expirationCondition = $condition.GetCondition()
$expirationCondition.ExpirationType = "ADM_EXPIRATIONTYPE_ACCOUNT"
$expirationCondition.ExpirationOperator = "ADM_EXPIRATIONOPERATOR_EXPIRED"
$expirationCondition.PeriodOperator = "ADM_EXPIRATIONCOMPARISONOPERATOR_MORETHAN"
$expirationCondition.PeriodValue = 30

# Save changes.
$condition.SetCondition($expirationCondition)
$condition.SetInfo()
$actionSet.Conditions.Add($condition)
C#
// The actionSet variable refers to an action set in a
// business rule, custom command, or scheduled task.

// Create condition.
IAdmBusinessRuleCondition condition = (IAdmBusinessRuleCondition)actionSet.Conditions.CreateEx(
    "adm-AccountPasswordExpirationCondition");
IAdmAccountPasswordExpirationCondition expirationCondition = 
    (IAdmAccountPasswordExpirationCondition)condition.GetCondition();
expirationCondition.ExpirationType = 
    ADM_EXPIRATIONTYPE_ENUM.ADM_EXPIRATIONTYPE_ACCOUNT;
expirationCondition.ExpirationOperator = 
    ADM_EXPIRATIONOPERATOR_ENUM.ADM_EXPIRATIONOPERATOR_EXPIRED;
expirationCondition.PeriodOperator = 
    ADM_PERIODCOMPARISONOPERATOR_ENUM.ADM_EXPIRATIONCOMPARISONOPERATOR_MORETHAN;
expirationCondition.PeriodValue = 30;

// Save changes.
condition.SetCondition(expirationCondition);
condition.SetInfo();
actionSet.Conditions.Add(condition);

Requirements

Minimum required version: 2011.3

See also