UsrMgr_EnumMembersOfLocalGroup
Description
Section titled “Description”Enumerates the members of a local group. This function only returns direct members. Members of nested groups aren’t included.
If the group doesn’t exist, the function returns True and gaValue is an empty array.
Syntax
Section titled “Syntax”UsrMgr_EnumMembersOfLocalGroup(sGroupName) As Boolean
Parameters
Section titled “Parameters”sGroupName (String)
Section titled “sGroupName (String)”Name or SID of the local group. The name isn’t case sensitive.
Return value
Section titled “Return value”Result will be stored in gaValue as an array of member names. Domain members are returned as DOMAIN\Name. Well-known accounts, such as INTERACTIVE, are returned by name only.
Example
Section titled “Example”If bStatus Then bStatus = UsrMgr_EnumMembersOfLocalGroup("CapaInstaller")If bStatus And IsArray(gaValue) Then For index = LBound(gaValue) to UBound(gaValue) bStatus = Job_WriteLog("Custom", "Index #" & index & ": " & cStr(gaValue(index)), bStatus, True) NextEnd IfRelated functions
Section titled “Related functions”UsrMgr_CreateLocalUser UsrMgr_CreateLocalGroup UsrMgr_IsUserMemberOfLocalGroup Constants Package Property Variables