cannot find the correct module to use Exchange cmdlets

Copper Contributor

I want to use some Exchange cmdlets in Automation account, and I suppose I need to import a Exchange module for this - but I cannot find the correct module. Does anyone know?


I would like to use these two cmdlets in Automation account (Powershell runbook) to add an user to a group, and to give permission to shared mailbox:

Add-UnifiedGroupLinks (documentation at
Add-MailboxPermission (documentation at


Something like this


  Param (

 [string] $Employee = ""


  $credObject = Get-AutomationPSCredential -Name "O365servicekonto"

  Connect-AzureAD -Credential $credObject

  $User = Get-AzureADUser -ObjectId $Employee

  Set-AzureADUser -ObjectId $User.ObjectId

  Add-MailboxPermission <email of the shared mailbox> -User $Employee -AccessRights FullAccess -InheritanceType all

0 Replies