Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We have around 1000 users in the Active Directory (on Windows 2008 R2) and we would like to batch update a field (student/employee ID number) from the school management system into their existing Active Directory accounts. Obviously, each student/employee ID is unique and needs to be matched to their current Active Directory account.

How can this be done? Is there a tool available for this purpose?

share|improve this question

I asume you have (or can create) a textfile with the accountname and the employeeID in it. If so you can run this command to read the file and process the changes.

for /f "tokens=1,2 delims=;" %a in (AD_EmployeeID.txt) do dsquery user -name "%a"|dsmod user -empid "%b"

The file must be in the current directory and must be named *AD_EmployeeID.txt*. The file must be a semicolmn seperated file where the first field is the accountname and the last is the employeeID.




I hope this helps.

NOTE 1: if you use this command in a batchfile, replace % with %%

NOTE 2: modify delims=; if the seperator is not a semicolmn but some other character

share|improve this answer

This can be done using a CSV file and some utilities, plenty of tutorials available out there to do so. As for a product, I like Bulk AD Users... takes a little practice, but it does work.

share|improve this answer
Oh yeah... plenty of PowerShell scripts out there for doing this kind of thing. – SpacemanSpiff Mar 23 '12 at 4:46

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.