getOSGroupName()

Returns the group name for an OS specific ID.

Synopsis

string getOSGroupName(string osid, bool useCD, [string domain]);

Parameters

Parameters Description
osid The OS specific ID.
useCD useDC specifies where the request is made (Default is the local computer). true means that the request is made on a Domain Controller
domain

The domain parameter specifies in which domain the query is executed.

The default value is the domain of the current computer (on which the query is executed).

If there is only one domain in the IT infrastructure, the parameter has no meaning.

If the IT infrastructure consists of several domains and a group was created in a different domain than the one where the query is executed, the attributes of the group will not be found. In this case, specify the correct domain by using the "domain" parameter.

Return value

The function returns the group name for an OS specific ID.

Description

Returns the group name for an OS specific ID.

Example

The following example returns the group name for the ID "S-1-5-21-1934636824-790261252-315576832-1002".

main()
{
  string gName;
  string osID = "S-1-5-21-1934636824-790261252-315576832-1002";
  gName = getOSGroupName(osID, false);
  DebugN("Name of the group", gName);
}                            

Assignment

User administration

Availability

CTRL