IADsGroup Interface

Inherited from

IADs

IDispatch

IUnknown

Applies to Objects

Global Group

Local Group

This is the primary interface of the Group and Local Group objects. You can use this interface to get or set group properties, and to add or remove users to or from groups. It also provides a method to check whether a given user is a member of a group or not.

Property/Method

Description

Access

Gets the Security object for managing permissions for the Group.

Add

Adds a new member to a group, usually a user or another global group (in case of local group)

Count

Gets the numbers of members of this group

Description

Gets and sets the text Description of a group

Filter

Gets and sets the Filter

GetTasks

Returns the array of task names assigned to this group in the given domain

IsMember

Checks whether a given user is a member of a group

Members

Returns a collection of Ads objects that represent the members of a group

Remove

Removes a member from a group, usually a user or another global group (in case of a local group)

Rename

Renames a group with a specified name

Example
This example demonstrates the use of IADsGroup Properties and Methods.

Dim Group as IADsGroup
'Bind to the known NT Group object.
'Here MSFT is your domain name and Zoo is name of a Group in MSFT.
Set Group = GetObject("NTDS://MSFT/Zoo")
'Debug.Print to print the name, Description etc. to the debug window.
'Here you can use Name property as IADsGroup is derived from IADs.
Debug.Print Group.Name
Debug.Print Group.Description
'Change the Description of the Group.
Group.Description = "New Description"
'Call SetInfo to commit the changes to the network.
'You could do this only if you have privileges for this operation.
Group.SetInfo
'Now refresh the ADS object cache with a GetInfo call.
Group.GetInfo
'Display Description.
Debug.Print Group.Description
'Add User Named Jane in to this group.
'Jane must be present in the Domain MSFT.
Group.Add("Jane")