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 @ migrationking.com 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. http://goo.gl/Lpsl7
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 - http://www.activedirectoryexport.com/ScreenShots.aspx
Level II. ManageEngine - AD Bulk Users (Their URL is too long, here's a link)
Level III. ScriptLogic - http://www.scriptlogic.com/products/activeadmin/

PluralSight Training: http://goo.gl/roo8Y

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

8 comments:

  1. Hey dude ,..
    your excel template is one of the best that i have come across since slice bread ..lol
    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

    ReplyDelete
    Replies
    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:

      http://goo.gl/roo8Y

      Delete
  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

    Toms

    ReplyDelete
    Replies
    1. Tom,

      That's outdated knowledge and an outdated tool. It applied to Windows 2000 Server:
      http://support.microsoft.com/kb/237677

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

      Delete
  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:
    BulkUserSourceFile!A2:H2

    To this:
    BulkUserSourceFile!A2,BulkUserSourceFile!B2,BulkUserSourceFile!C2,BulkUserSourceFile!D2,BulkUserSourceFile!E2,BulkUserSourceFile!F2,BulkUserSourceFile!G2,BulkUserSourceFile!H2

    Cheers.

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

    Regards
    Danny
    dan@bredband.com

    ReplyDelete
  5. ASN Active Directory Manager is a simple desktop tool for Windows Active Directory Reporting and Management. Bulk objects creation, modification, restore, enable/disable, reset, unlock, join/disjoin groups, delete, accidental deletion protection, etc

    http://www.adsysnet.com/asn-active-directory-manager-features.aspx

    ReplyDelete