?
Solved

Error from CSVDE when creating contacts in AD

Posted on 2009-02-12
6
Medium Priority
?
484 Views
Last Modified: 2013-12-24
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
0
Comment
Question by:vwtechteam
  • 3
  • 3
6 Comments
 
LVL 35

Expert Comment

by:Joseph Daly
ID: 23625954
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
 

Author Comment

by:vwtechteam
ID: 23626086
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
 
LVL 35

Expert Comment

by:Joseph Daly
ID: 23626117
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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Author Comment

by:vwtechteam
ID: 23626866
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
 
LVL 35

Accepted Solution

by:
Joseph Daly earned 2000 total points
ID: 23626931
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
 

Author Closing Comment

by:vwtechteam
ID: 31546180
Great!  Thanks again!
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article, I’ll look at how you can use a backup to start a secondary instance for MongoDB.
In today's business world, data is more important than ever for informing marketing campaigns. Accessing and using data, however, may not come naturally to some creative marketing professionals. Here are four tips for adapting to wield data for insi…
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…

807 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question