IAdmObjectExistsCondition
The IAdmObjectExistsCondition interface represents the If <object> exists condition.
Inheritance: IAdmCondition
Properties
-
Property
-
Description
-
IsOperator
-
Gets or sets a value indicating whether the object should or should not exist for the condition to be met.
-
ObjectToCheck
-
Gets or sets the object that should or should not exist for the condition to be met.
Details
IsOperator
Gets or sets a value indicating whether the object should or should not exist for the condition to be met.
- Type:
- ADM_ISOPERATOR_ENUM
- Access:
- Read/Write
ObjectToCheck
Gets or sets the object that should or should not exist for the condition to be met.
- Type:
- IAdmObjectReference
- Access:
- Read/Write
Examples
The following code sample creates a condition that returns true if the Acme_Managers group doesn't exist.
- 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-ObjectExistsCondition") $objectExistsCondition = $condition.GetCondition() $objectExistsCondition.IsOperator = "ADM_ISOPERATOR_ISNOT" $objReference = New-Object "Softerra.Adaxes.Adsi.AdmObjectReference" $objReference.ObjectDN = "CN=Acme_Managers,OU=Groups,DC=acme,DC=com" $objectExistsCondition.ObjectToCheck = objReference # Save changes. $condition.SetCondition($objectExistsCondition) $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-ObjectExistsCondition"); IAdmObjectExistsCondition objectExistsCondition = (IAdmObjectExistsCondition)condition.GetCondition(); objectExistsCondition.IsOperator = ADM_ISOPERATOR_ENUM.ADM_ISOPERATOR_ISNOT; IAdmObjectReference objReference = new AdmObjectReference(); objReference.ObjectDN = "CN=Acme_Managers,OU=Groups,DC=acme,DC=com"; objectExistsCondition.ObjectToCheck = objReference; // Save changes. condition.SetCondition(objectExistsCondition); condition.SetInfo(); actionSet.Conditions.Add(condition);
Requirements
Minimum required version: 2019.1