Sylver SCHORGEN Blog's

Articles, astuces et news sur les technologies Microsoft et plus particulièrement tournant autour de Powershell

Hi everyone,

I've created a PowerShell script to add a Mail Contact in an Exchange Online. What this script does is :

  • Connect to Exchange Online : You will be prompt for an admin credentials
  • Verifying that the contact does not already exist
  • If your contact does not exist, the script creates it
  • If you added the parameter to hide your contact from the GAL, the script hides it

I've added some verbose log in order to know what the script is doing :)

How to use the script :

.\New-O365MailContact.ps1 -ContactEmailAddress "john.doe@mail.com" -UserFullName "John DOE"
.\New-O365MailContact.ps1 -ContactEmailAddress "john.doe@mail.com" -UserFullName "John DOE"
-HideFromGAL $True

The Link of my script : https://github.com/sschorgen/PowerShell/blob/master/O365_New-O365MailContact/New-O365MailContact.ps1

Facebook Like