Platform SDK: Network Management

Group Functions

A global group contains user accounts from one domain that are grouped together under one group account name. A global group can contain only members (users) from the domain where the global group is created; it cannot contain local groups or other global groups. A global group is available within its own domain and within any trusting domain.

The network management group functions control global groups. The group functions are listed following.

Function Description
NetGroupAdd Creates a global group.
NetGroupAddUser Adds one user to an existing global group.
NetGroupDel Removes a global group whether or not the group has any members.
NetGroupDelUser Removes one user name from a global group.
NetGroupEnum Lists all global groups on a server.
NetGroupGetInfo Returns information about a particular global group.
NetGroupGetUsers Lists all members of a particular global group.
NetGroupSetInfo Sets general information about a global group.
NetGroupSetUsers Assigns members to a new global group; replaces the members of an existing group.

When you call the NetGroupAdd function to create a global group, you must supply a group name. Initially, a new group has no members.

User accounts automatically belong to one of the special global groups Domain, Users, or None, according to the user's security requirements. Membership in these groups is indirectly controlled by the NetUserAdd, NetUserDel, and NetUserSetInfo functions.

Global group account information is available at the following levels:

GROUP_INFO_0
GROUP_INFO_1

GROUP_INFO_2

GROUP_INFO_1002
GROUP_INFO_1005

The 1002 and 1005 levels are valid only for the NetGroupSetInfo function.

Global group member information is available at the following information level:

GROUP_USERS_INFO_0

For more information, see the network management Local Group Functions.

If you are programming for Active Directory™, you may be able to call certain Active Directory Service Interface (ADSI) methods to achieve the same functionality you can achieve by calling the network management group functions. For more information, see IADsGroup.