Thursday, March 27, 2008

Importing Mail Contacts to exchange 2007 in bulk!


Your company needs to have an address list that contains contacts from multiple companies. I was talking with Alaa in this regards, he suggest implementing MIIS, but unfortunately it needs some requirements that is not available yet in our servers room :). So we need something fast to import those contacts to our exchange 2007 server.



  • Solution:
    First, we need a CSV file that contains some columns to be exported from those companies (exported from the Domain Controllers), this file will have some attributes of the users like display name and e-mail address.
    Login to the domain controller in each company (or ask the in charge person) and do the following:
    - Open AD Users & Computers, go to View->add/remove columns, then add the following columns, in the same order:
    Display Name
    E-mail address
    Exchange Alias


  • Browse to the OU that contain the users accounts that need to be imported, make sure that the view is showing the columns that you had select in the previous step, if not, choose them again, go to Action->Export List, and save the file as (comma delimited) ( *.csv). You need now to work on this file using MS excel.




  • Open this file with excel, now we have to rename the columns as the following:
    Name DisplayName MailAddress Alias
    It should looks like this:


  • Save the file, then copy it to C:\ on the Exchange server (where you want to import the contacts)


  • Start Exchange Management Shell, copy and paste the following command:

    import-csv c:\contacts.csv | foreach { new-mailcontact -alias $_.Alias -name $_.displayName -ExternalEmailAddress $_.MailAddress -org contacts }

Note: before running this command you must have an OU on the AD called contacts otherwise the command will return an error. You can also create your own OU, but change the OU name after –org switch in the previous command.

The contacts is created now, in the next article am gonna show how to create a custom address list for each company based on the imported contacts.


Alaa A. Al-Ankar said...

Hi M. Al-Enezi :)

Regarding to the discussion we had before in regards to your question this is what I understood:

your company has sisters companies which have thier own AD Forest / Exchange 2K7 & some has E2K3, and your company would like to have one GAL that contains all the users from each and every Forest under thier umbrella, so my solution was to use the "GALSync" tools which is part of MIIS Feature Pack, which is a small portion of the overall MIIS Solution.

here is more links for this tool and more to read about it:

GAL Sync with the Identity Integration Feature Pack (IIFP)

Note: check the "Related Links" section at the end of this article for more Microsoft Articles which are related to GALSync.

your solution is valid one, and as i remember we discussed it together, but the problem in that solution is that you need to run this command for each and every new user been added under any other forest other than your Forest, which is from my point of view additional administration headache for you :)

anyway, i am glad that you could solve your issue , and for sure your managements are happy now :)


Alaa A. Al-Ankar

M_Al-Enezi said...

You are right, I had read the article, but as I told you we need some fast solution and we may implement the GALsynch later, further more, the required GAL should contain the hight management contact informations, normal employees is not that much required,so am not going to update it manually.
any you thanks for your comment.

Anonymous said...


Alex said...

I have known quite numerous utilities for solving MS Exchange problems. But no one of them didn't have such characteristics as the one. It might be good choice in this unpleasant situation, because of I checked it on my problem - exchange inbox repair tool.

jack said...

I would try to use it.
bulk email software

Vinay Singh said...

Importing Mail Contacts to exchange 2007 in bulk! Scenario: Your company needs to have an address list that contains contacts from multiple companies.

Email Blast

vabna islam said...

Thanks a bunch for sharing this with all people you actually recognize what you are talking about! Bookmarked. Kindly also discuss with my website.
B2B Email List