This guide will show you how to use PowerShell to create a shared mailbox in an Exchange Hybrid.
In an Exchange Hybrid with Office 365 mailboxes should be created and managed using the on-premises Exchange server
Creating mailboxes in this way means that the mailbox is created in Exchange on-premises, the user is synced to Office 365 and the AD user object has the right Exchange attributes for a Hybrid environment
On Exchange server - open Exchange Management Shell (run as Administrator)
New-Remotemailbox -Shared -Alias TechLabsSales -OnPremisesOrganizationalUnit `
"OU=Shared Mailboxes,OU=TechLabs,DC=techlabs,DC=me,DC=uk" -Name "TechLabs Sales" `
-SamAccountName Sales -UserPrincipalName sales@techlabs.cloud -PrimarySmtpAddress sales@techlabs.cloud
New-Remotemailbox -Shared -Alias TechLabsSales -OnPremisesOrganizationalUnit ` "OU=Shared Mailboxes,OU=TechLabs,DC=techlabs,DC=me,DC=uk" -Name "TechLabs Sales" ` -SamAccountName Sales -UserPrincipalName EMAIL_ADDRESS -PrimarySmtpAddress EMAIL_ADDRESS
New-RemoteMailbox Options
-PrimarySmtpAddress
Sets the email address you only need to use this option if you want an email address that is different from your address policy
-Archive
Creates an archive mailbox
To manually run a directory sync
Logon to your Azure AD connect server and run this PowerShell
Start-ADSyncSyncCycle -PolicyType Delta
Office 365 shared mailbox has been created, there is no need to assign a license to the user
Exchange Online Admin Center
Recipients - Shared - select the mailbox - edit
Mailbox delegation - add the user you want to give permissions to both Full Access and Send As
After about 30-40 mins the shared mailbox will show up in the users Outlook
They might need to close and re-open Outlook for the changes to take effect
Check if Message Copy for Sent As is enabled for a mailbox
Connect to Exchange Online PowerShell
Get-mailbox sales@techlabs.cloud | select MessageCopyForSentAsEnabled
Set Message Copy for Sent As to true for a mailbox
set-mailbox sales@techlabs.cloud -MessageCopyForSentAsEnabled $True
On Exchange server - open Exchange Management Shell (run as Administrator)
Remove-remotemailbox –identity sales@techlabs.cloud
Comments