Creating a CSV for import into AD

Discussion in 'Active Directory Exams' started by simongrahamuk, May 29, 2008.

  1. simongrahamuk
    Honorary Member

    simongrahamuk Hmmmmmmm?

    6,205
    136
    199
    I'm trying to set up a simple CSV for import into Active Directory. The fields that I have at the moment are:
    • objectClass
    • sAMAccountName
    • dn
    • homeDrive
    • homeDirectory
    • profilePath
    the first three fields import correctly as expected, my problems start when I'm setting up the fields for the home drive, home directory and the profile.

    homeDrives value is simple: H:

    profilePath is also straightforward as I want all of the values to be the same: \\\\server\\profile\\userprofile1
    (can someone explain to me why the need for all of the back slashes?)

    homeDirectory is where I'm struggling with what values to put in presumably it would be something like: \\\\server\\homedir\\userhomedir1
    Since I want each user to have a different home directory I thought that I could change the path to something like this: \\\\server\\homedir\\%username% is this possible?

    When I run csvde to import the file I get a referral error on line 2? any ideas?

    Attached is a screen shot of my example csv.

    Ta.
     

    Attached Files:

  2. hippy

    hippy Kilobyte Poster

    307
    5
    40
    hi,

    Not sure if this will help, but did you do an export from AD using csvde into a .csv? Or did you just make up the excel sheet and save it in a .csv format?
     
  3. simongrahamuk
    Honorary Member

    simongrahamuk Hmmmmmmm?

    6,205
    136
    199
    I originally used csvde to export the data to the csv. since ad includes a lot of information that you don't need when creating accounts I have removed that information.
     
  4. hippy

    hippy Kilobyte Poster

    307
    5
    40
    Was worth a shot, yer i use the -r and -l filters to get rid of what i dont need.

    thinking about it the user isnt even in AD yet, so doing a %username% would make it go in oblivion?
     
  5. simongrahamuk
    Honorary Member

    simongrahamuk Hmmmmmmm?

    6,205
    136
    199
    Anyone got any more input on this one? :hhhmmm

    How do you all bulk import users? :unsure
     
  6. Stoney

    Stoney Megabyte Poster

    731
    23
    69
    I think you do it using the method your using.

    Your problem seems to be with the home directory for the users and the fact that it doesn't like the %username% variable.
     
    Certifications: 25 + 50 metre front crawl
    WIP: MCSA - Exam 70-270
  7. NightWalker

    NightWalker Gigabyte Poster

    1,172
    25
    92
    Certifications: A+, Network+, MCP, MCSA:M 2003, ITIL v3 Foundation
  8. Obinna Osobalu

    Obinna Osobalu Banned

    539
    7
    0

    For more information about the powerful CSVDE command, including details regarding its parameters and its usage to export directory objects, open the Windows Server 2003 Help and Support Center. The LDIFDE command, also covered in detail by the Help and Support Center, allows you to import and export accounts using LDAP formats. This command and its file structure is nowhere near as intuitive for administrators as the comma-delimited file supported by CSVDE.
     
    Certifications: MCITP:SA,MCTS(x5),MCSE2K3;MCSA2K3:M;MCP
    WIP: EDA7,70-652,Project+,MSP(70-632)
  9. MLP

    MLP Kilobyte Poster

    305
    19
    59
    I don't know if this would help at all. I haven't tried it myself yet, but I'll be testing it sometime this week.

    Maria
     
    Certifications: HND Computing
  10. Modey

    Modey Terabyte Poster

    2,397
    99
    154
    You could always leave the home directory bit until after the accounts have been created. You could then use dsquery & dsget to create a list of users, then dsmod to populate the new homedir info. It may need an interim stage where you tinker with some Excel string functions to get the correct final commands, which you could then pop into a batch file. There is a good guide here if you aren't familiar with those commands.
     
    Certifications: A+, N+, MCP, MCDST, MCSA 2K3, MCTS, MOS, MTA, MCT, MCITP:EDST7, MCSA W7, Citrix CCA, ITIL Foundation
    WIP: Nada

Share This Page

Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.