0 votes

This script description says it can find the manager via FullName Distinguished name or Display name. Wondering if we can change it to use employeeID or SamAccountName.

by (1.0k points)
0

Hello,

Sorry for the confusion, but we are not sure what script you mean. Please, post it here or send to us at support@adaxes.com.

0

https://www.adaxes.com/script-repository/import-new-and-updated-users-from-csv-file-s246.htm This script from your repository. Yes I have modified it slightly but the section regarding the manager has not been changed and it can find the manager based on full name however what happens when I have two managers with the same name. So trying SamAccount or EmployeeID.

1 Answer

0 votes
by (272k points)

Hello,

Thank you for clarifying. yes, it is possible. You will need to update the value of the -Filter parameter in the following line of the script:

$aDObject = Get-AdmObject -Filter {(Name -eq $value) -or (DisplayName -eq $value) -or (distinguishedName -eq $value)} `
                -AdaxesService localhost -ErrorAction SilentlyContinue -Server $domainName

For example, in case you want to use the Employee ID to find Managers, the line should be as follows:

$aDObject = Get-AdmObject -Filter {(employeeId -eq $value)} `
                -AdaxesService localhost -ErrorAction SilentlyContinue -Server $domainName
0

Awesome thank you! It works perfectly.

Related questions

0 votes
1 answer

Hi All, I am currently using the 30 day free trial of Adaxes and seeing if we can use it to achieve our method of user provisioning. I am looking into server-side ... variable value within an SQL query Can this be achieved? Any help is much appreciated, Thanks

asked Feb 1 by Lewis (40 points)
0 votes
1 answer

We are upgrading some of our applications from dotnet framework to dotnet 6+ and we have found that the Adaxes SDK is not compatible. When can we expect compatibility? Thanks

asked Dec 11, 2023 by katebrownhm (20 points)
0 votes
1 answer

Thanks for the info. I'm now grabbing the %adm-ManagerUserName% value, but need to remove the final 21 characters of it so it contains only their username and not our ... this in the PowerShell Script Editor for my business rule, I get the following error:

asked Mar 11, 2021 by mkvidera (60 points)
0 votes
1 answer

Would "updating a user" also be triggered when "creating a user"? So for example, if I set a Business Rule trigger to modify a user when their user account is changed, would ... and I could not find one. If there is a document that covers this let me know.

asked Jan 17, 2023 by mobosys (290 points)
0 votes
1 answer

Or is there another solution to solve this?

asked Sep 15, 2022 by boris (470 points)
3,346 questions
3,047 answers
7,772 comments
544,970 users