Create external mail contacts via Powershell

Posted on 2012-08-23
Medium Priority
Last Modified: 2012-08-23

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
Question by:antmax00
LVL 19

Accepted Solution

R--R earned 2000 total points
ID: 38327730

Author Comment

ID: 38327774
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


Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

High user turnover can cause old/redundant user data to consume valuable space. UserResourceCleanup was developed to address this by automatically deleting user folders when the user account is deleted.
This article will help to fix the below errors for MS Exchange Server 2016 I. Certificate error "name on the security certificate is invalid or does not match the name of the site" II. Out of Office not working III. Make Internal URLs and Externa…
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …
Suggested Courses

864 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