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?
CiscoAznAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Joseph MoodyBlogger and wearer of all hats.Commented:
0
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) {
$Person.SamAccountName
$Person.Description
$Person.State
$Person.City
Set-ADUser -Identity $Person.SamAccountName -Description $Person.Description -City $Person.City -State $Person.State
}

Open in new window

0
LibranDragonCommented:
Hi,

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..
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Exchange

From novice to tech pro — start learning today.