AD Powershell

I need to update user parameter fields in AD like  Description , office , job tittle, Department, Conmpany and Manager.

I have a csv file from a payroll system that I need to use as master file ,

I would like a powershell script that can read the user file and update those fields in AD
Who is Participating?
Justin YeungSenior Systems EngineerCommented:
Yes it will just over write the existing with the same manager.
Justin YeungSenior Systems EngineerCommented:
assume your csv header is samaccountname,description,office,department,company,manager

$objects = import-csv -Path c:\temp\import.csv

foreach ($Object in $objects)
Set-ADUser $Object.SamAccountname `
-Description $object.description `
-Office $ `
-Department $object.department `
-Company $ `
-Manager (Get-ADUser $object.Manager)

Open in new window

gd6627Author Commented:
Justin if I already have the manager sam account associated with the user can I just list it in the csv file?  I also need to add job title
gd6627Author Commented:
How about job title? and I also need to add address, city, state , zip code
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.