When you use CSVDE -i to import user accounts, you make changes that will be difficult to
reverse. For instance, you may import unsuitable usernames, but then you cannot
find those users in Active Directory. In frustration, you delete
existing users as well as the imported test accounts. In export mode, you can
do no harm to Active Directory, also CSVDE -f filename.csv will help build up your
understanding of the switches.
1) Practice with export first! So that you learn the switches, and
obtain the precise spelling of LDAP fields, for example sAMAccountName is
correct, sAMAaccountNames has two mistakes and would cause the import to fail.
2) Create a good .CSV file. Master the LDAP fields in the first row.
3) Use VBScript to enable accounts and set the password. This overcomes
the main limitation of CSVDE namely that you cannot import passwords, nor can
you alter accounts in anyway. See here for
a VBScript to reset passwords.
Mastering bulk import will save you time when you
need to create hundreds of user accounts. CSVDE would be the method of choice if you have the users in a
spreadsheet.
Guy Recommends: Solarwinds' Free Bulk Import Tool
Import users from a spreadsheet. Just provide a list of the
users with their fields in the
top row, and save as .csv file. Then launch this FREE utility and match
your fields with AD's
attributes, click and import the users. Optionally, you can
provide the name of the OU where the new accounts will be born.
There are also two bonus tools in the free download, and all 3 have been approved by Microsoft:
To import a file into Active Directory use the CSVDE -i which
tells it to import. -f users.csv is the filename.
So the complete command is CSVDE -i -f users.csv Note the space
between the command and each switch. The first line, referred to as the
header, should have a list of the field names. For example, DN, FirstName,
Surname.
Preparation: Open the text file with the users, and
add LDAP attributes to the top row.
Command: CSVDE -i -f usersi.csv
Example 2: Using the -k to force an import
Command: CSVDE -i -k -f usersi.csv
Example 3: A CSV file with the LDAP attributes in the top row.
Preparation: If you wish to use this example below, firstly copy and
paste it into notepad. Then change the attributes to match your
circumstances. For example, change WonderDom to your domain name, and
change the OU=Worcester to OU=yourOU.
I suggest importing the
file into Excel, making your changes, then exporting it as a
.CSV file.
Windows Management Instrumentation (WMI) is one of the hidden
treasures of Microsoft operating systems.
Fortunately, Solarwinds
have created the
Free WMI Monitor so that you can actually see and understand these gems of
performance information. Take the guess work out of which
WMI counters to use for applications like Microsoft Active Directory,
SQL or Exchange Server.
Save
hours of frustration and buy Guy's eBook. The extra features include:
detailed instructions on how to import and export user accounts, ten new pages
of worked CSVDE examples.
You get a printer friendly version with copy
enabled, and no expiry date.