IAdmGroupMembershipCondition
The IAdmGroupMembershipCondition interface represents the If the object is a member of <group> condition.
Inheritance: IAdmCondition
Properties
-
Property
-
Description
-
IsOperator
-
Gets or sets a value indicating whether an object should or should not be a member of the group to meet the condition.
-
Group
-
Gets or sets the group an object should or should not be a member of to meet the condition.
-
CheckDirectMembersOnly
-
Gets or sets a value indicating whether the condition is applied to direct group members only or to all the members, including members of the groups that are nested within the group.
Details
IsOperator
Gets or sets a value indicating whether an object should or should not be a member of the group to meet the condition.
- Type:
- ADM_ISOPERATOR_ENUM
- Access:
- Read/Write
Group
Gets or sets the group an object should or should not be a member of to meet the condition.
- Type:
- IADsGroup
- Access:
- Read/Write
Examples
The following code sample creates a condition that returns true if the target object is a member of the Help Desk group.
- 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-GroupMembershipCondition") $membershipCondition = $condition.GetCondition() $membershipCondition.IsOperator = "ADM_ISOPERATOR_IS" $groupDN = "CN=Help Desk,OU=Groups,DC=domain,DC=com" $group = $service.OpenObject("Adaxes://$groupDN", $null, $null, 0) $membershipCondition.Group = $group # Save changes. $condition.SetCondition($membershipCondition) $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-GroupMembershipCondition"); IAdmGroupMembershipCondition membershipCondition = (IAdmGroupMembershipCondition)condition.GetCondition(); membershipCondition.IsOperator = ADM_ISOPERATOR_ENUM.ADM_ISOPERATOR_IS; const string groupDN = "CN=Help Desk,OU=Groups,DC=domain,DC=com"; IADsGroup group = (IADsGroup)service.OpenObject($"Adaxes://{groupDN}", null, null, 0); membershipCondition.Group = group; // Save changes. condition.SetCondition(membershipCondition); condition.SetInfo(); actionSet.Conditions.Add(condition);
Remarks
When this property is set, the IAdmGroupMembershipCondition2::GroupDnTemplate property is automatically set to null.
CheckDirectMembersOnly
Gets or sets a value indicating whether the condition is applied to direct group members only or to all the members, including members of the groups that are nested within the group.
- Type:
- bool
- Access:
- Read/Write
Requirements
Minimum required version: 2009.1