GetAccessGroup
Gets a user group assigned to this zone given a specific role.
Syntax
IHzRoleAssignment GetAccessGroup(IRole role, DirectoryEntry group)
IHzRoleAssignment GetAccessGroup(IRole role, SearchResult groupSr)
IHzRoleAssignment GetAccessGroup(IRole role, string groupDn)
IHzRoleAssignment GetAccessGroup(IRole role, IADsGroup groupIAds)
Parameters
Specify the following parameter when using this method:
Parameter | Description |
---|---|
role
|
The role of the group. |
Specify one of the following parameters when using this method.
Parameter | Description |
---|---|
group
|
The directory entry for the group. |
groupSr
|
The directory entry for the group specified as a search result. |
groupDn
|
The group specified as a distinguished name. |
groupIads
|
The IADs interface to the group. |
Return value
The computer role assignment that includes the specified group
(IHzRoleAssignment.TrusteeType==Group)
.
Discussion
Any number of user groups can be assigned to a computer role and each of those groups can have more than one role. Use this method to get the computer role assignment for a specific group and role.
The GetAccessGroup(IRole role, DirectoryEntry group)
and GetAccessGroup(IRole role, SearchResult groupSr)
methods are available only for .NET-based programs;
call GetRoleAssignmentfor
VBScript.
Exceptions
GetAccessGroup
may throw one of the following exceptions:
-
ArgumentNullException
if the specified parameter value isnull
. -
ApplicationException
if the parameter value is not a valid user; or if it failed to create a role assignment because it cannot find the user.
Example
See AddAccessGroup
for an example of using the GetAccessGroup
method in a
script: