This script allow you to create contacts in Exchange Online by using a CSV file as input. I made that script during a migration project from Exchange OnPremise to Exchange Online. You can download it here .
- Exchange Online Admin credentials.
- A log file path, which will contains the potentials errors during the script execution, but also the succeful actions.
- A CSV file using ; as delimiter. The CSV file needs to looks like the following :
The first colums will contains the contact name, and the second column will contains the contact email adress.
- Open Windows PowerShell
- Run the Create-Contact.ps1
- Enter the Credential which is at least Exchange Online Administrator, then click OK.
- Enter your log file path, and your CSV contact list :
- Then click Enter to start the script.
The log file, that you will specified will contains all the actions made by the script.
Output Exemple 1
In this exemple, i have specified a bad file path or name for my CSV file.
Output Exemple 2
In this exemple, and you have may be notice it, but I deliberately slipped an error for the second contact. The log file informs you that the first contact was successfully created, but not the second one, plus it store the exception message in order to help you to resolve this error.
Hoping that script will be useful for some of you.