Home » Exchange Server » PowerShell Script to Import Mail Contacts from a CSV File to Exchange

PowerShell Script to Import Mail Contacts from a CSV File to Exchange

Import-MailContactsFromCSV.ps1 is a PowerShell script to automate the creation of Exchange mail contacts using a CSV file for input.

The current version of the script supports a CSV file containing the following fields, which are the minimum details required for creating a mail contact in Exchange:

  • Name
  • ExternalEmailAddress

The script looks for a file named Contacts.csv by default, or you can use the optional -CSVFileName parameter to specify your own file name. You can also set a default OU for contacts in the script, or use the -OU parameter to specify an OU.

Download the script from the TechNet Gallery or GitHub.

Example usage:

If you are providing this script to a non-administrator to use, you can configure an RBAC custom role to limit their permissions to only allow them to create contacts in a specific OU, as demonstrated here.

Paul is a Microsoft MVP for Office Servers and Services. He works as a consultant, writer, and trainer specializing in Office 365 and Exchange Server. Paul is a co-author of Office 365 for IT Pros and several other books, and is also a Pluralsight author.
Category: Exchange Server

Leave a Reply

Your email address will not be published. Required fields are marked *