Asked by:
How to modify AD users' attributes in bulk via PowerShell

Question
-
Described as the title, I want to modify the users' attributes, like changing the employID, employNumber in bulk.Friday, July 14, 2017 7:47 AM
All replies
-
help set-aduser -full
\_(ツ)_/
- Proposed as answer by BOfH-666 Friday, July 14, 2017 8:37 AM
Friday, July 14, 2017 8:00 AM -
Hi JasonKerry,
You could use the following script to modify AD users' attributes in bulk with the same value :
Get-ADUser -Filter * -Properties * | %{Set-ADUser -Identity $_ -add @{employeenumber="1"}}
In addition, you could use a PowerShell script to export all employID and employNumber to a csv.
You could update the csv file (perhaps with Excel), then use it to update the users in bulk. The update script would be very similar, but use the Import-Csv cmdlet piped to the Set-ADUser cmdlet.
Best Regards,
Candy
Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.
- Edited by Candy LuoMicrosoft contingent staff Friday, July 14, 2017 10:07 AM
- Proposed as answer by Candy LuoMicrosoft contingent staff Friday, July 21, 2017 8:52 AM
Friday, July 14, 2017 9:51 AM -
Hi JasonKerry,
Just checking in to see if the information provided was helpful.
Please let us know if you would like further assistance.
Best Regards,
Candy
Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.Friday, July 21, 2017 5:48 AM -
Hi JasonKerry,
Was your issue resolved?
If you resolved it using our solution, please "mark it as answer" to help other community members find the helpful reply quickly.
If you resolve it using your own solution, please share your experience and solution here. It will be very beneficial for other community members who have similar questions.
If no, please reply and tell us the current situation in order to provide further help.
Best Regards,
Candy
Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.Tuesday, August 1, 2017 9:42 AM