How do you create mail enabled contacts from csvde?

Posted on 2009-04-21
Last Modified: 2012-06-21
I exported users from one domain into a csv file.  I then modified the csv to import it into another domain as contacts.  What format do you need to import a user as a mail enable contact?

A sample of the csv file I currently have is shown below:

"CN=Gray\\, Eric ,OU=Embarkable,DC=cool,DC=com",contact,"Gray, Eric",,smtp:,
"CN=Jim\\, Aleyda M. OU=Embarkable,DC=cool,DC=com",contact,"Salinas, Jim M." ,,smtp:,
"CN=amy.buchs,OU=Embarkable,DC=cool,DC=com",contact,"Buchs, Amy J ",,smtp:,

Question by:necromiser
    LVL 11

    Expert Comment

    by:Zuhir Elgmati

    Author Comment

    The microsoft knowledge base does not show me which object to use to establish a email enabled contact through a csv file.
    LVL 15

    Accepted Solution

    Excerpted from

    Bulk contact import to AD using CSVDE

    If you are just creating mail-enabled contacts, here is the format for the minimal amount of information for a test user into the OU\Distribution\Categories:
    contact,Aaron Adams,"CN=Aaron Adams,OU=Category,OU=Distribution,DC=Domain,DC=com",aadams,,,{26491CFC-9E50-4857-861B-0CB8DF22B5D7},

    Copy all of the text between the lines and paste it into Excel (you may have to separate out the columns manually). There are two rows - first is the HEADERS which defines the attributes we are importing; second is the actual data. (You can paste into a text editor like Notepad or Word if you want to do a lot of manual work!) Excel will allow you to create formulas and "fill down" so you only have to put in the name and e-mail once and it will generate the other columns for you. Using this template, you can modify the values for your environment and put in all the users, then save as a CSV file and import it into Active Directory using "CSVDE -I -F IMPORT.CSV".

    If you want to see the exact DN you need, based on your domain, dump all of your existing contacts using the following command (typed as one line):
    CSVDE -F CONTACTS.CSV -R "(objectclass=contact)" -L objectClass,displayName,DN,mailNickname,targetAddress,proxyAddresses,msExchPoliciesExcluded,mail

    That weird looking value for the import "{26491CFC...}" means "remove the checkbox to automatically update e-mail address based on recipient policy" on the e-mail address tab for the object.

    Author Closing Comment

    Thank you!  That was exactly what I was looking for.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Shouldn't all users have the same email signature?

    You wouldn't let your users design their own business cards, would you? So, why do you let them design their own email signatures? Think of the damage they could be doing to your brand reputation! Choose the easy way to manage set up and add email signatures for all users.

    Resolve Outlook connectivity issues after moving mailbox to new Exchange 2016 server
    "Migrate" an SMTP relay receive connector to a new server using info from an old server.
    This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…

    737 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

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now