Bulk User Account Export

G

Guest

Hi -

What is the best way to export all Domain users to a file, so the file can
be edited to change user attributes such as their phone #, and individual
departments and then import the data back in ?

From what I understand, CSVDE can't modify, so it won't work . I am not sure
about LDIFDE, since I am wanting to edit different changes to each account,
not so much as a bulk change.

Any ideas ?
 
R

Richard Mueller [MVP]

Ken said:
What is the best way to export all Domain users to a file, so the file can
be edited to change user attributes such as their phone #, and individual
departments and then import the data back in ?

From what I understand, CSVDE can't modify, so it won't work . I am not
sure
about LDIFDE, since I am wanting to edit different changes to each
account,
not so much as a bulk change.

You might be able to use LDIFDE. Another option is a VBScript program that
reads values from a spreadsheet. I have an example VBScript program that
uses ADO to export the Distinguished Names of all users to an Excel
spreadsheet linked here:

http://www.rlmueller.net/Create User List 3.htm

You could then add columns for each attribute that you might modify. Another
program can read each row of the spreadsheet, bind to the user using the
Distinguished Name in the first column, then check each column in the same
row. If there is no value, leave it alone. If there is a value, assign the
value to the corresponding attribute. I have an example VBScript program
that does this, but for only one attribute, profilePath, linked here:

http://www.rlmueller.net/UpdateUserProfile.htm

This example recognizes the special value ".delete". If this is found in the
column for profilePath, the program removes any existing value assigned to
this attribute for the user (you cannot simply assign a blank string). This
program could be expanded to modify other attributes in other columns of the
spreadsheet. Note that the program does not do anything with the profilePath
attribute if the corresponding column is blank. The exact same techniques
can be used for other attributes, as long as they are single-valued and
string. Other techniques would be required for multi-valued and non-string
attributes.

Also, the first program could be expanded to export other values as well,
and write them to other columns of the spreadsheet. I hope this helps.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top