Morning people. This is a bit of a tricky one…
So I have a function pulling up user information from AD. One of the fields is department and this is returned in a format like:
department : Drystock Specialists
The issue I have is that it also gives a field “Manager” but this is obsolete as it is not changed from the day the account is created, however for every department, there is another OU containing a distribution list, in this example
DL_DeptMgr_DrystockSpecialists and this contains one Member - that name is what I also need to output as it is updated constantly.
So far, I can see that I need to use the department field, with space removed and use it to find the distribution list, removing (ignoring) the DL_DeptMgr_ part, and then show the member and tagging this field as “Department Manager”, even better - The “Description” of this OU is “Department Manager of Drystock Specialist”, so if it is possible for it to output:
“DL Description” : “DL Members: Name”
I can see this is a very messy way of doing things, but unfortunately I have no control over AD