0 votes

We found this script for updating group membership by department: http://www.adaxes.com/script-repository ... t-s403.htm

However we would like it to be based off of jobCode instead. Also it is this is a department template, how would we create those?

by (3.2k points)

1 Answer

0 votes
by (270k points)
selected by
Best answer

Hello,

You will need to update the following lines:

$departmentProperty = "department"

Replace department with the LDAP name of the property that will be used for the group names template.

$groupNameTemplate = "Department_{0}_"

Replace Department_{0}_ with the required template for group names.

Also you can update warnings depending on the property used for the group names template. For example:
Replace There is no group for department '$department' with There is no group for Job Code '$department'.

0

Hello,

The first 13 extension attributes have a length of 1024 characters, Extension Attributes 14 have 15 have lengths of 2048 characters.

The extension attribute of each group will not need to contain all the Job Codes. You will need to enter only Job Codes of users that should be added to the group.

0

I still don't get how the jobCodes would translate to the necessary groups associated with the jobCode. Do you have sample script i could look at?

0

Hello,

Sorry for the confusion.

You will need to enter the Job Codes to the extension attribute of each group manually.

0

Ok, so if i am reading this correctly. For every group we use we need to add the appropriate job Codes to an attribute on that specific group ID.

We were hoping to be able to add it to a property pattern instead however we dont see the option to add memberOf fields.

0

Hello,

Ok, so if i am reading this correctly. For every group we use we need to add the appropriate job Codes to an attribute on that specific group ID.

Yes, that is correct.

We were hoping to be able to add it to a property pattern instead however we dont see the option to add memberOf fields.

There is no possibility to achieve what you want using property patterns.

Related questions

0 votes
1 answer

Hello, I have 3 groups in my AD environment and want to show all the users that belong to each group. For example - Group 1 Group 2 Group 3 The existing report in the Adaxes ... -Usser D etc. Is there a way to create a report like this? Thank you in advance!

asked Nov 6, 2020 by sirslimjim (480 points)
0 votes
1 answer

Hello, is it possible to update a user attribute (extensionAttribute5) with the name of the group (Name), the user was just added to? Example: In Group A gets a new ... A should be written in the attribute extensionAttribute5 of User A. Can you please help me?

asked Jun 27, 2023 by lohnag (140 points)
0 votes
1 answer

Receive "Index operation failed; the array index evaluated to null. Stack trace: at <ScriptBlock>, <No file>: line 104>" and "Index operation failed; the ... $GroupName, $GroupDN." } } #foreach write-output "" Write-Output "" Stop-Transcript

asked Apr 14, 2022 by jbahou (20 points)
0 votes
1 answer

Update group membership based on one property values. I am trying to find a script that resembles "Update group membership based on two property value" but just for one value.

asked Apr 7, 2022 by lee_thomas (20 points)
0 votes
1 answer

Is it possible with Adaxes to update a distribution groups membership based on the users in an OU? I know this is exactly what a dynamic distribution group is for, but for certain reasons I need this to be a normal distribution group not dynamic.

asked Mar 16, 2015 by yobhod (150 points)
3,326 questions
3,025 answers
7,723 comments
544,675 users