0 votes

I have already made several attempts but do not manage. I want to create a report where I can select a user and then all the groups that start with XY are displayed. I have also tried with the report "Users' membership in groups" to display all groups of a user, but this does not work either, even if I reset the report. So how can I create such a report where I only have to select the user and then run the report and it will show me all groups that start with XY.

Thanks a lot

by (280 points)


For us to help you with a solution, please, specify the following:

  1. What exactly do you mean by groups that start with XY? Is it that the report should only include the groups whose names start with XY?
  2. How exactly should XY be specified? Do you want it to be predefined in the script or selected by the user generating the report?
  3. Do you need to take into account only direct membership or also membership in nested groups?

Any additional details will be much appreciated.



  1. report should only include groups whose names start with xy
  2. XY is predefined in the script
  3. also in nested groups

thanks a lot

1 Answer

0 votes
by (277k points)


Thank you for the provided details. To achieve the desired, you need to create a report with a Directory object picker parameter. The report will execute the below script. The parameter will be used to select the user to output groups for. The report does not need a scope. For details on creating reports, see https://www.adaxes.com/help/CreateReport. In the script:

  • $searchValue - Specifies the value group names should start with to be included into the report.
  • $userParameterName - Specifies the name of the parameter used to select the user to generate the report for. The parameter name should include the param- prefix.
$searchValue = "XY" # TODO: modify me
$userParameterName = "param-User" # TODO: modify me

# Get user group membership
$userDN = $Context.GetParameterValue($userParameterName)
$user = $Context.BindToObjectByDN($userDN)
$groupGuidsBytes = $user.GetEx("adm-MemberOfGuid")

# Search parameters
$searcher = $Context.CreateGuidBasedSearcher($groupGuidsBytes)
$searcher.Criteria = New-AdmCriteria "group" -Expression {name -startsWith $searchValue}

# Generate report

Related questions

0 votes
1 answer

I need to create a report of all enabled users in selected group or multiple groups. I am aware of the report named "Members of selected groups", but I don't know how to filter only enabled users. Is there a way to achieve this?

asked May 28 by gsoc.ssm (90 points)
0 votes
0 answers

When I run the above script after selecting groups the custom field "Group" is not showing one of the selected groups and not all of the groups are being reported ... 2 specific security groups are appearing and neither in one that was included in the search

asked Nov 18, 2021 by A_Pastor (70 points)
0 votes
1 answer

Every role-based-group starts with "arbg-" Users should only be in 1 arbg- group To enforce this, on any user change I would like to remove them from any "arbg- ... -Identity <SamAccount> | Select Name | Where-Object {$_.Name -Like 'ARBG*'}

asked Apr 29, 2022 by stevehalvorson (110 points)
0 votes
1 answer

Our Help Desk currently 'mirrors' the group membership of a new user based on another existing user in our AD. I'd like to be able to automate this so that the initiator ... and 'paste' it on the new user being created. Any help on this would be appreciated!

asked Apr 21, 2020 by RayBilyk (230 points)
0 votes
1 answer

Hi Guys, Short question. In our organisation we have a buch of the security group that have a specific "class". The class is simple number stored in the ExtensionAttribute1. I'd ... tried to do the something like that with ADSI :cry: Could you please help me?

asked Dec 8, 2014 by axmaster (510 points)
3,411 questions
3,108 answers
545,849 users