Saturday, June 18, 2011

Active Directory Bulk User Import - Using DSAdd User

Need to get a lab live? If you are tired of waisting money and hours on Google searching for Active Directory User Import Tools and commands, just use this Excel File to run a bulk of users in a batch file from PowerShell or Command Prompt.

Here is the dsadd user command that will be created by the excel file by just adding your users and department OU sections:

dsadd user "cn=Migration King,ou=Users,ou=IT,ou=Departments,dc=us,dc=migrationking,dc=local" -fn Migration -ln Migration -samid MKing -upn MKing@migrationking.local -display "Migration King" -pwd P@ssw0rd -mustchpwd yes -disabled no

(For people that submit tweaks and fixes, please email support @ and we will add your edits and your name showing who submitted the correction/edits).
1. Option A: Sign into Google Docs and Copy the template.
1a. Option B. Download a local copy if you are still absolutely addicted to Microsoft Excel.
1b. Option C. Fill out the data, check it and then just export the Text File to Create the Batch file for AD.

2. Add Your Users and OU Information for your Department and Users (KISS as a rule for AD Departments)

3. Modify =CONCATENATE if you are overly complex and super corporate, if not drop in your data under "AddActiveDirectoryBulkUsers" sheet.

4. Check the "BulkUsersSourceFile" to see that data is populated correctly.

5. Review the "ExportTextFile" script lines for accuracy (saves a headache later). Then export.

6. Option A: Create a .bat file from Notepad File you exported and then run this from Command Prompt.

7. Option B: Spartan Style! Copy and Paste right into PowerShell Window

8. Verify accounts on your Domain Controller (onsite or via RackspaceCloud Servers if your in the cloud)

Booyaaahhhh!!! Your done. Wasn't that fast and easy? And you didn't have to crack out your credit card or beg your manager to buy you some complicated program for Active Directory Imports.

Now, start setting up Google Apps Directory Sync for Google Apps for Business Implementation.

* There are multiple options to use for Production environments at scale. Group policy has a lot of flexibility also. Here are some good programs for AD Import and Export:

Level I (I can rock this out during lunch!)
Levels II (I can get through this in a day or two...or three)
Levels III (OMG It's Complicated! WHAT were they thinking when they released this??!)

Level I. ActiveDirectory Import -
Level II. ManageEngine - AD Bulk Users (Their URL is too long, here's a link)
Level III. ScriptLogic -

PluralSight Training:

* Everything here is best advice and at your own risk so if you break something, please don't blame us. Have fun! ~MigrationKing


  1. Hey dude ,..
    your excel template is one of the best that i have come across since slice bread
    but for some reason its not generating a complete export text file for example..
    dsadd user "cn=Migration King,ou=Users,ou=IT,ou=Departments,dc=us,dc=migrationking,dc=local" -fn Migration -ln Migration -samid MKing -upn MKing@migrationking.local -display "Migration King" -pwd P@ssw0rd -mustchpwd yes -disabled no

    1. Thanks! However, I grabbed it from TrainSignal and just did a modification. All credit goes to TrainSignal and the "Coach". Here is the link:

  2. Hi,

    Thanks a lot for the dsadd tutorial.

    I am certified in MCSE 2003 and currently updating to Windows 2008.

    There was a tool in Windows 2003 CSVDE (using CSV files to import users to Windows 2003 Active Directory. I remember there was another tool LDIFDE also. These tools are still available?

    Request you to kindly post an article on those tools.

    Thanks you very much


    1. Tom,

      That's outdated knowledge and an outdated tool. It applied to Windows 2000 Server:

      It's deprecated. I will only cover topics for Windows 2008R2 and Windows Server 2012.

  3. This is great mate. Some advice for people who download the file as xlsx as I did - in Excel 2010 you need to change the CONCATENATE formula otherwise Excel doesn't create the path properly.

    Change this:

    To this:


  4. Hi, can't find your excel sheet, plz mail me or add a link.


  5. Use active directory manager tool of adsysnet,

  6. PLEASE don't use ".local" at the end of your domain. (This is in the Google Sheets template in this article.)

    You will regret it as soon as you have anything other than a 100% Microsoft environment. It is a horrible recommendation that Microsoft stopped making many years ago. Just read this 6 year old article for a few of the problems:

    If you bring in anything that uses mDNS (a.k.a. Bonjour) it will conflict and cause problems. Know any executives or managers who like iPhones? If you use ".local", it's only a matter of time before they ask for access to a resource and you can't deliver it.

    I won't beat this to death, but it really is something you should avoid.