GroupID 9 and 10 - Automate
We would like to create a custom dynasty based on two attributes in GroupBy: 'manager' and 'location'. When the child dynasties are created, their display name populates with the distinguished name of the managers. We want to replace the distinguished name with the CN of the managers.
Create a custom dynasty with the GroupBy attributes: manager and location (L).
Open the properties of the parent dynasty and click the Options button on the GroupID tab.
Click Edit Script.
Uncomment line 7:
args.FilterMethodName = "GroupByFilter"
Add a script under line 12:
Function GroupByFilter(Byval value as string) As string:
Dim result as string = Split(value, ",")(0)
result = Replace(result, "CN=", "")
Compile the script and save the changes.
Now update the parent dynasty group. The child groups will get created with the CN populated in the display name.
- GroupID Automate - User Guide