|
Action |
Enumerates local groupmembership of the current user on a trusted domain or a member server.
|
Syntax |
ENUMLOCALGROUP (index, "source")
|
Parameter |
Index
A numeric value representing the group whose name you want to discover (where 0 is the first subkey).
Source
String value representing the server or domain whose local groups you want to query.
|
Remarks |
Local group membership in the logon domain can be enumerated using ENUMGROUP. EnumLocalGroup is intended for local groups in other domains or on member servers.
|
Returns |
|
String |
Local group name |
|
Error code |
Function failed |
|
Example |
$Index = 0
DO
$Group = ENUMLOCALGROUP($Index)
$Index = $Index + 1
UNTIL Len($Group) =
0
- Or -
$Index = 0
DO
$Group = ENUMLOCALGROUP($Index,
"\\MyServer")
$Index = $Index + 1
UNTIL Len($Group) =
0