getOSGroupID()

Returns the operating system ID of a specific user group.

Synopsis

string getOSGroupID( string name[, string domain]);

Parameters

Parameter Description
name Name of the user group.
domain

The parameter "domain" specifies in which domain the query is executed. The default value is the domain of the current computer (where the query is executed). If only one domain exists in the IT infrastructure, the parameter does not bear a meaning. If the IT infrastructure consists of several domains and a group was created in another domain than where the query is executed, the operating system ID of the user group is not found. In this case, specify the correct domain by using the parameter "domain".

Example:

  • The group belongs to the domain "Domain1" and the computer used to execute the query was logged on in the same domain -> the operating system ID is found.

  • The computer is logged on in another domain than "Domain1", the operating system ID is not found or if a group with the same name exists in this other domain, the wrong operating system ID is found.

Return value

The operating system ID of a specific user group.

Description

Returns the operating system ID of a specific user group.

Example

The following example returns the OS-ID for the user group "operator" from the domain "ET101".

main()
{
  DebugN(getOSGroupID("operator",
  "ET101"));
  //Return value:
  "S-1-5-21-1934636824-790261252-315576832-2029"
}

Assignment

User administration

Availability

CTRL