1

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?

2 Answers 2

3

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

1

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

1
  • Oh yeah... plenty of PowerShell scripts out there for doing this kind of thing. Mar 23, 2012 at 4:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .