Scenario:
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:
Name
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.