Bulk changes in Active Directory

After aquiring several companies we need to change the AD description fro all accounts. Each OU has 200-300 AD accounts and i want to change the City, State, ...etc. How do i do this in bulk instead of doing it one at a time?
Who is Participating?
LibranDragonConnect With a Mentor Commented:

Depending on the OU structure

If accounts are in a OU, go to the respective OU and select all accounts that need to be change, right-click -> Properties -> 3rd Tab = Address

Select the fields you want updated, then select OK to apply..

You can test with 2 accounts first..
Joseph MoodyBlogger and wearer of all hats.Commented:
Will SzymkowskiSenior Solution ArchitectCommented:
Use the following command below for your needs...

CSV file needs to be created as follows...

sAMAccountName    City             State   Description
bsmith                           NewTown   NY       Accounting Dept
mcooper                        Drysdale     AR       Human Resources
So on....

Script below...
Import-Module activedirectory
$Users2Mod = Import-Csv c:\yourCSVFileHere.csv
$Users2Mod = Foreach ($Person in $Users2Mod) {
Set-ADUser -Identity $Person.SamAccountName -Description $Person.Description -City $Person.City -State $Person.State

Open in new window

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.