Link to home
Create AccountLog in
Powershell

Powershell

--

Questions

--

Followers

Top Experts

Avatar of Mike Dias
Mike Dias

Powershell - Batch Update AD User Object > Organization Tab > Manager > Name
I have over 80 users that I need to update their Manager's Name field in their AD User Object > Organization Tab > Manager Name

The users are in a txt and CSV file.

Is there a PS script that will process the update?

Zero AI Policy

We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.


Avatar of QlemoQlemo🇩🇪

You should just have combined that with your other "modifying" questions. I'm sure you do not want to add the same manager to all of those users?
It is usually better to give us the bigger picture in a single question, and let us decide whether it makes sense to split the question.

Avatar of Mike DiasMike Dias

ASKER

You have a point,. It's a good point, I believed that splitting the question would be easier and less confusing. It sounds like I'm asking for a big bag.. and that might stop anyone assisting; whereas a smaller request might get answers.

I think I have a clue to this one.
https://4sysops.com/archives/configuring-ad-users-and-managers-with-powershell/

I need to script it.. if you have any ideas, let me know.

Avatar of QlemoQlemo🇩🇪

As you can see from the link, setting the Manager attribue for an user is easy. It is the logic which requires effort for bulk changes.

You already fooled me in https://www.experts-exchange.com/questions/29065282/Powershell-Batch-Update-AD-User-Object-Member-Of-Tab.html by not providing any details, leading to "answering" the question yourself (using semi-optimal code).
I will refrain from providing suggestions as long as you do not show the (desired or real) input file. Or confirm whether it is indeed just a text file containing user names only, and you want to add the same manager (and in regard of https://www.experts-exchange.com/questions/29065280/Powershell-Batch-Update-AD-User-Object-Organization-Tab-Job-Title.html the same job title).

Reward 1Reward 2Reward 3Reward 4Reward 5Reward 6

EARN REWARDS FOR ASKING, ANSWERING, AND MORE.

Earn free swag for participating on the platform.


Thanks. Apologies for any perceived misunderstandings and believe me, it wasn't intentional.

I do have a text file with usernames. I can't attach the real one; confidentiality aside, the whole story is that there are 85+ individuals in various OUs that I need to move into one OU. In this process, I need to update their "manager" and "job title." Once I have these users in the OU, I need to apply two or three GPOs to them.

That's the whole background.

I truly felt that if I broke this request into segments, it would be easier for anyone who reviewed the issue. I found one method parts thereof, however there are times that I need to only perform one aspect and not all of the segments, i.e. just update a number of user's manager etc. This is where the split was most beneficial to me.

Again. I apologize for any misunderstandings. I also sincerely thank you for assisting me in the past, with advice and actual code. Your work and understanding is by far top notch.

ASKER CERTIFIED SOLUTION
Avatar of QlemoQlemo🇩🇪

Link to home
membership
Log in or create a free account to see answer.
Signing up is free and takes 30 seconds. No credit card required.
Create Account

Good answer! Thanks. Explanation helped.
Powershell

Powershell

--

Questions

--

Followers

Top Experts

Windows PowerShell is a task automation and configuration management framework from Microsoft, consisting of a command-line shell and associated scripting language built on the .NET Framework. PowerShell provides full access to the Component Object Model (COM) and Windows Management Instrumentation (WMI), enabling administrators to perform administrative tasks on both local and remote Windows systems as well as WS-Management and Common Information Model (CIM) enabling management of remote Linux systems and network devices.