How to create 500+ user accounts using data from Excel ????

Discussion in 'Active Directory' started by Eric Daly, Dec 18, 2003.

  1. Eric Daly

    Eric Daly Guest

    I have 500+ users names in an Excel spreadsheet which contains 2 colums, Firstname & Surname.

    Can someone please let me know is there a tool or a way to import this information into active directory. I could be here for 2 months creating all the user accounts manually !!!

    Any help is greatly appreciated.

    Regards,
    Eric Daly.
    Ireland.
     
    Eric Daly, Dec 18, 2003
    #1
    1. Advertisements

  2. information into active directory. I could be here for 2 months creating all
    the user accounts manually !!!
    See the online help for use of

    CSVDE and LDIFDE

    also see
    http://www.microsoft.com/windows2000/techinfo/planning/activedirectory/bulksteps.asp

    --
    Regards,

    Mike
    --
    Mike Brannigan [Microsoft]

    This posting is provided "AS IS" with no warranties, and confers no
    rights

    Please note I cannot respond to e-mailed questions, please use these
    newsgroups

    information into active directory. I could be here for 2 months creating all
    the user accounts manually !!!
     
    Mike Brannigan [MSFT], Dec 18, 2003
    #2
    1. Advertisements

  3. information into active directory. I could be here for 2 months creating all
    the user accounts manually !!!

    Hi,

    Mike's suggestion to use csvde or ldidfe may be your best bet. However, to
    create user objects, you need to assign two mandatory attributes. These are
    cn (Common Name) and sAMAccountName (the NT logon name, also called the
    "pre-Windows 2000 logon name"). Also, you need to specify the Active
    Directory container in which the objects will be created. You must either
    determine these values from the columns in your spreadsheet, or add columns.

    For example, if a VBScript program reads each row of your spreadsheet and
    assigns the variable strFirst to be the value in the first column, and the
    variable strLast to be the value in the second column, you might assign
    sAMAccountName and cn to both be the concatenation of these two. Or, you
    might assign cn to be strFirst & " " & strLast, or strLast & ", " &
    strFirst. You might assign sAMAccountName to be Left(strFirst, 1) & strLast.
    You could either create all users in the same container (or OU) and hard
    code the Distinguished Name of this container in your program, or add a
    column to your spreadsheet for this value.

    I have a sample VBScript program that creates users from a Microsoft Excel
    spreadsheet linked on this page:

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

    This program does more than you requested, but could be modified for your
    purpose. The program linked has the parent container hard coded in the
    program. Also, the spreadsheet name is hard coded. I like using
    spreadsheets, because formulas can be developed to construct the values for
    some attributes from the values of others.
     
    Richard Mueller [MVP], Dec 18, 2003
    #3
  4. Eric Daly

    Eric Daly Guest

    Hi Richard,
    Thank you so much for your help on this one. I used your VBS script and modifed a few variables in Excel to give me .I was up until 2:30am this morning fine tuning it, but by god was it worth it. I did a test run on 400+ users and they were all created in less than 5 mins.

    Your website is a credit to you. Had a look at a few other scripts and I must say they are outstanding !

    Anyhow, thanks again and have a good Christmas.

    Regards,
    Eric Daly.
    Cork, Ireland.
     
    Eric Daly, Dec 19, 2003
    #4
  5. Hi,

    I'm glad it worked, and thanks for the feedback.

    --
    Richard
    Microsoft MVP Scripting and ADSI
    HilltopLab web site - http://www.rlmueller.net
    --
    and modifed a few variables in Excel to give me
    .I was up until 2:30am this morning fine
    tuning it, but by god was it worth it. I did a test run on 400+ users and
    they were all created in less than 5 mins.
    must say they are outstanding !
     
    Richard Mueller [MVP], Dec 19, 2003
    #5
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.