Create external mail contacts via Powershell

Hello,

I'm looking for a powershell script to create external mail contacts from a csv file(contacts.csv) in exchange 2007.


The csv file will have the following columns:
 Name | FirstName  | LastName  | Email Address

Environment: W2K8 r2 SERVER & Exchange 2007
antmax00Asked:
Who is Participating?
 
antmax00Author Commented:
Actually i got a script to work. I had to adjust a few of the attributes. i was using surName and givenName
Import-CSV C:\scripts\contacts.csv | ForEach-Object{
New-MailContact -ExternalEmailAddress $_.Email -Name $_.DisplayName -Firstname $_.Firstname -Lastname $_.Lastname -OrganizationalUnit $_.OUpath
}

Open in new window

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.