Script Repository

Users who are members of each specified group

May 12, 2020

The script can be used to generate a report that will include users who are members of each group specified in a parameter. To run the script, create a report with an AD object picker parameter that will be used to specify the groups whose members will be added to the report.


  • $groupsParam - Specifies the name of the parameter used to specify groups with the param- prefix.
  • $groupsParamSeparator - Specifies a value that will be used to separate values of the parameter whose name is specified in the $groupsParam variable (e.g. semilocon). The separator should not be a comma as it is used in distinguished names (DNs).
Edit Remove
$groupsParam = "param-groups" # TODO: modify me
$groupsParamSeparator = ";" # TODO: modify me

# Get parameter value
$groupDNs = $Context.GetParameterValue($groupsParam)

# Build search filter
$filter = "(&(sAMAccountType=805306368)"
foreach ($dn in $groupDNs.Split($groupsParamSeparator))
    $filter += [Softerra.Adaxes.Ldap.FilterBuilder]::Create("memberOf", $dn)
$filter += ")"


# Generate report

Comments ( 0 )
No results found.
Leave a comment