top of page

Remote Shared Mailbox (ExO)

  • Writer: Damian Scoles
    Damian Scoles
  • Jun 25, 2018
  • 2 min read


For this tip of the week we'll talk about something specific in Exchange Hybrid and PowerShell. Specifically it has to do with the creation of Remote Mailboxes in you Exchange Online tenant. From your Exchange on-premises server there is a cmdlet called New-RemoteMailbox. While this cmdlet is great for creating mailboxes in Exchange Online as well as their connected AD object for you in one fell swoop, there was a limit to its functionality. Simply put, you could not add a remote mailbox directly with the cmdlet.


We can now create a Shared Mailbox like so:


New-RemoteMailbox -Name "Accounts Payable" -Shared -UserPrincipalName AccountsPayable@domain.com -OnPremisesOrganizationalUnit "domain.com/Shared"


Notice the one-liner is similar to how you were able to create a remote resource mailbox in Exchange Online. Those mailboxes could be created with t

he -Equipment or -Room switch as needed.


Prior to these changes in order to create a Shared Remote Mailbox prior to these changes you would have to do the following in PowerShell:


(1) From your Exchange on-premises server, run something similar to this:

New-RemoteMailbox ……

(2) Then you would start a delta sync from your Azure AD Connect server:

Start-ADSyncSyncCycle Delta

(3) Finally, once that mailbox was in your Exchange Online tenant, you would be able to convert the mailbox into a shared mailbox. However, you would need to connect to Exchange Online PowerShell which could be complicated by an MFA login. [** Note ** If you haven't turned on MFA for those who have access to Exchange Online PowerShell, you should. It is a best practice as per Microsoft.]


Non-MFA Method

$LiveCred = Get-Credential

$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell/ -Credential $LiveCred -Authentication Basic -AllowRedirection

Import-PSSession $Session


MFA Method

$LiveCred = Get-Credential

Connect-EXOPSSession -Credential $LiveCred


Once connected, you were then able to convert the mailbox, with PowerShell, to a shared mailbox with a one-liner like this:


Get-Mailbox NewShared | Set-Mailbox -Type Shared


Notes from Microsoft


"-Shared

Note: This switch is available only in Exchange 2013 CU21 or later and Exchange 2016 CU10 or later. To use this switch, you also need to run setup.exe /PrepareAD. For more information, see KB4133605.


The Shared switch specifies that the mailbox in the service should be created as a shared mailbox. You don't need to specify a value with this switch.


You can't use this switch with the Room or Equipment switches."


** Caveats to the new parameter - you will need to run this prior to seeing the parameter available in PowerShell:


setup /preparead /IAcceptExchangeServerLicenseTerms


Make sure to also read the just posted article about Shared Mailbox sizing and provisioning at the EHLO blog - https://blogs.technet.microsoft.com/exchange/2018/06/21/correcting-shared-mailbox-provisioning-and-sizing/

 
 
 

Recent Posts

See All
Null. Empty. Space? How to Detect?

** Disclaimer ** I do not know everything about PowerShell and I am sure I will miss some methods of detection of empty values. However,...

 
 
 

Comments


© 2016-2020 by Damian Scoles and Dave Stork.

bottom of page