Takes a group, user or computer and recursively returns a list of groups the object is a member of.
#Include <AD.au3>
_AD_RecursiveGetMemberOf($sObject[, $iDepth = 10[, $bListInherited = True[, $bFQDN = True]]])
Parameters
| $sObject | User, group or computer for which the group membership is to be returned. Can be specified as Fully Qualified Domain Name (FQDN) or sAMAccountName |
| $iDepth | Optional: Maximum depth of recursion (default = 10) |
| $bListInherited | Optional: Defines if the function returns the group(s) it was inherited from (default = True) |
| $bFQDN | Optional: Specifies the attribute to be returned. True = distinguishedName (FQDN), False = SamAccountName (default = True) |
Return Value
Success: Returns an one-based one dimensional array of group names (FQDN or sAMAccountName) the user or group is a member of
Remarks
This function traverses the groups that the object is immediately a member of while also checking its group membership.
Related
_AD_IsMemberOf, _AD_GetUserGroups, _AD_GetUserPrimaryGroup