IAdmMailEnabledCondition

The IAdmMailEnabledCondition interface represents the If is mail-enabled condition.

Inheritance: IAdmCondition

Properties

  • Property

  • Description

  • IsOperator

  • Gets or sets a value indicating whether the target object should or should not be mail-enabled in Exchange to meet the condition.

Details

IsOperator

Gets or sets a value indicating whether the target object should or should not be mail-enabled in Exchange to meet the condition.

Examples

The following code sample creates a condition that returns true if the target object is not mail-enabled.

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-MailEnabledCondition")
$mailEnabledCondition = $condition.GetCondition()
$mailEnabledCondition.IsOperator = "ADM_ISOPERATOR_ISNOT"

# Save changes.
$condition.SetCondition($mailEnabledCondition)
$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-MailEnabledCondition");
IAdmMailEnabledCondition mailEnabledCondition =
    (IAdmMailEnabledCondition)condition.GetCondition();
mailEnabledCondition.IsOperator = ADM_ISOPERATOR_ENUM.ADM_ISOPERATOR_ISNOT;

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

Requirements

Minimum required version: 2010.2

See also