Error from CSVDE when creating contacts in AD

I have been tasked with creating several hundred contact objects in AD.  All of them have the same domain name for their SMTP addresses, and they will all have the same formatting.  Rather than doing them individually, I was hoping to import them from a CSV using only their first and last names.

I created a CSV (csv attached using generic values for the first name, last name, and domain) and run CSVDE, but I receive an error.  Th error is, "Multiple values were specified for an attribute that can only have one value".

The error is pretty self-explanatory, but I am just not spotting the problem.  Of course, I am pretty much using variables for the whole thing, so that may be the root of all of the trouble.  Heck, I am not even sure what I am trying to do will work.

Anyway, any help would be deeply appreciated.

Thanks!
sample.csv.txt
vwtechteamAsked:
Who is Participating?
 
Joseph DalyConnect With a Mentor Commented:
Well what you can do is something similar to below. The one I put in the code snippet was a script that I used to modify all users information based off of our Oracle employee DB. Yours would actually have been even more simple to accomplish.

It simply would have been something like

DSADD contact CN={contactname},OU=Newcontacts,DC=domain,DC=com and then your desired switches from the article here
http://www.geocities.com/rick_lively/MANUALS/COMMANDS/D/DSADD.HTM 

I hope that makes sense if not let me know and I can try to explain better.
for /F "delims=! tokens=1,2,3,4,5,6,7,8" %%h IN (adupdate.txt) Do dsquery user -samid "%%h" | dsmod user -display "%%i" -ln "%%j" -fn "%%k" -title "%%l" -desc "%%l" -tel "%%m" -mobile "%%n" -empid "%%o"

Open in new window

0
 
Joseph DalyCommented:
Can you please provide a sample showing the structure of the CSV file you would like to import from. I may have a solution other than CSVDE.
0
 
vwtechteamAuthor Commented:
Sure thing...

I have actually been looking at it and saw that I had a couple of duplicate columns in my CSV.  So after playing around with it for a bit, this is what I have come up with.  Still giving me trouble, but a work in progress.

(I posted it as a code snippet.  First line is column headers, the rest are the values... the msg box just word wraps them). Let me know if you need it another way.

Thanks!
DN,objectClass,cn,givenName,sn,displayName,proxyAddresses,targetAddress,name,mail
"cn="%'givenName'%%'sn'%",ou=Contacts,dc=na,dc=company,dc=corp",contact,%'givenName'%%'sn'%,John,Smith,"%'sn'%, %'givenName'%",%1'givenName'%%sn%@domain.com,"SMTP:""%1'givenName'%%sn%"@domain.com",%1'givenName'%%'sn'%

Open in new window

0
Simplify Active Directory Administration

Administration of Active Directory does not have to be hard.  Too often what should be a simple task is made more difficult than it needs to be.The solution?  Hyena from SystemTools Software.  With ease-of-use as well as powerful importing and bulk updating capabilities.

 
Joseph DalyCommented:
No I mean the actual file you are importing like

John, Smith, companytech idustries, 555-1212, 555-1212 or however yous CSV file is structured.
0
 
vwtechteamAuthor Commented:
Pressed for time, we just divided them up and created them manually... thanks for looking though.  Just out of curiosity, what other method were you going to suggest?
0
 
vwtechteamAuthor Commented:
Great!  Thanks again!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.