Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

2 Answers 2

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.


e.g.

John;1234

Jane;1235


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.

http://www.wisesoft.co.uk/software/bulkadusers/default.aspx

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

 
discard

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.