Importing csv list of contacts into Exchange 2007 GAL and create Distribution Group

Posted by Ken Ray on Server Fault See other posts from Server Fault or by Ken Ray
Published on 2011-02-08T18:48:17Z Indexed on 2012/09/22 9:40 UTC
Read the original article Hit count: 444

Filed under:

Here's the situation:

We have a list of about 1,000 contacts (Lawyers in the area our court serves) with name and email address. I've been asked to create an email distribution list that can be used to sent emails to all of the external users on that list. I've seen various articles using the Exchange Management Shell and the Import-csv command piped through a ForEach-Object to a New-MailContact to set up the contacts.

However, Exchange Management Shell is rather unhelpful, and it isn't working.

What I believe I need to do is:

1) Set up a new distribution group using the Exchange Management Console. Let's say this new distribution group (which appears in the list of Distribution Groups under Recipient Configuration) is called "FloridaBar".

2) Make sure I have a csv file of the information I want to import.

3) Open Exchange Management Shell, and enter the following command:

Import-csv C:\filename.csv | ForEach-Object { New-MailContact -Name 

$."NameColumnName" -ExternalEmailAddress $."EmailAddressColumn" -org FloridaBar

Now, creating 1,000+ contacts in active directory - I assume that shouldn't be an issue.

Do I have the "-org" parm wrong? Do I need to spell out the complete organization unit name (my.domain.name/Users/FloridaBar)?

Is there a better way of doing this?

Thanks in advance

Ken

© Server Fault or respective owner

Related posts about exchange-2007