In this guide, you will learn how to update the Manager attribute in Active Directory using PowerShell. I’ll also show you how to update multiple users by using the AD Pro Toolkit.
When employees change departments or new staff is hired you will often need to make changes to their account settings in Active Directory. For example, the HR department has hired a new manager and now you need to update the manager attribute for all the HR user accounts.
The good news is this can easily be done with PowerShell and other management tools.
Video Tutorial
If you don’t like videos then continue reading the details below.
Method 1. Update Manager Attribute with PowerShell
You can use the set-aduser cmdlet to update the manager attribute.
In this example, I’m going to update the manager on the user account Agnes.Haywood.
Step 1. Get Manager Attribute
First, let’s check the manager attribute for the user.
get-aduser -Identity Agnes.Haywood -properties *| select manager
Currently, the manager attribute is set to robert.allen. I want to change this to adam.reed.
Step 2. Run set-aduser cmdlet
Next, I’ll use the set-aduser cmdlet to update the manager attribute to the account adam.reed.
set-aduser -Identity Agnes.Haywood -Manager adam.reed
Now, I’ll run the get-aduser cmdlet again to verify the manager attribute has been updated.
It was a success!
You can see in the screenshot above the manager attribute has been changed from robert.allen to Adam S. Reed.
If you want to update the manager attribute for multiple users you would need to create a CSV file and run a for each loop on each line. If you don’t want to mess with PowerShell then check out the example below.
Method 2. Update Manager Attribute using the Active Directory User Updater Tool
With this tool, you can easily update the manager attribute for single or multiple users. You can also update multiple attributes at once.
In this example, I’ll update the manager attribute for 363 HR user accounts.
Step 1. Download and Install
The bulk updater tool is 1 of 14 tools included in the AD Pro Toolkit. You can download a free trial and try it for yourself.
Click here to download a free trial
Step 2. Create CSV Template
From the toolkit click on User Bulk Updater and click on the CSV Template button.
Step 3. Edit CSV File
Tip: Use the export users tool to quickly create a list of all users from a group, OU or the entire domain.
Add the users you want to update to the ID column and the manager’s logon name to the manager column.
Step 4. Run Bulk Updater Tool
The last step is to select your template and click run.
When it has completed check the logs.
Great! 362 user accounts have been updated.
Let’s verify the changes.
From the Export Users Tool, I will select the HR OU and move the manager column to the far left.
Looks good.
Verify the update using PowerShell.
get-aduser -filter * -SearchBase "OU=HR,OU=ADPRO Users,DC=ad,DC=activedirectorypro,DC=com" -properties * | select manager
All done!
In this guide, I showed you two options for updating the manager attribute for Active Directory users. If you like creating PowerShell scripts then you can easily bulk update the manager attribute for multiple users. If you want an alternative to PowerShell then check out the Active Directory User Updater Tool.