Skip to content

/commands/exchange-online/convert-mailbox-to-shared

Convert a user mailbox to a shared mailbox: Set-Mailbox -Type Shared

The commands on this page have not been executed by our verification runner yet.updated
tool
Exchange Online PowerShell
versions
Exchange Online, ExchangeOnlineManagement 3.x
os
windows, linux, macos

To turn a user's mailbox into a shared mailbox (for example when an employee leaves), run in Exchange Online PowerShell:

powershell
Set-Mailbox -Identity anna@contoso.com -Type Shared

All mail, calendar items and inbox rules stay in the mailbox. The command needs the Recipient Management or Organization Management role group, and the mailbox must still be licensed when you convert it.

Check the result

powershell
Get-EXOMailbox -Identity anna@contoso.com -Properties RecipientTypeDetails |
  Format-List DisplayName,RecipientTypeDetails

RecipientTypeDetails changes from UserMailbox to SharedMailbox. Valid values of -Type are Regular, Shared, Room, Equipment and, in the cloud only, Workspace and Desk.

After converting

  1. Give people access: Add-MailboxPermission -AccessRights FullAccess and Add-RecipientPermission -AccessRights SendAs (commands).
  2. Remove the license if the mailbox is smaller than 50 GB (for example with Set-MgUserLicense -RemoveLicenses). Do not delete the user account: it anchors the shared mailbox.
  3. Block sign-in or reset the password. If you do neither, the original user name and password keep working on the shared mailbox.

Check the size before removing the license:

powershell
Get-EXOMailboxStatistics -Identity anna@contoso.com | Format-List DisplayName,TotalItemSize

When the mailbox still needs a license

NeedLicense
Mailbox larger than 50 GB (up to 100 GB)Exchange Online Plan 2
Litigation Hold or In-Place HoldExchange Online Plan 2, or Plan 1 plus Exchange Online Archiving
Auto-expanding archiveExchange Online Plan 1 plus Exchange Online Archiving

Convert back

powershell
Set-Mailbox -Identity anna@contoso.com -Type Regular

Then assign a license and reset the password so the person can sign in again.

Sources