Office 365 introduces the concept of a shared mailbox. Shared mailboxes are free, as long as they are under 5GB in size.

There is plenty of documentation that describes the process to create a new shared mailbox, but how do you convert an existing licensed mailbox to a shared mailbox?

I have read through a number of Office 365 community forum threads that ask this question and provide a variety of methods to achieve this. These methods include backing up data/recreating the mailbox/restoring the data or adding/removing SMTP addresses across 2 mailboxes. These methods are not suitable if you have a large number of mailboxes to convert, or if you’re lazy.

Now I cannot say whether the following is a ‘Microsoft supported’ approach, but it works and I have used it to convert over 500 mailboxes to shared mailboxes. Once you have an Office 365 PowerShell session established, the conversion involves 3 steps:

1. Confirm combined TotalDeletedItemSize and TotalItemSize is under the size limit for a shared mailbox. The shared mailbox size limit is 5GB, but we’re going to be setting warning levels at 4.5GB so ideally you want the mailbox to be less than 4GB.

Get-MailboxStatisics <Alias> | FL Total*

2. Configure the shared mailbox parameters and assign any required permissions:

Set-Mailbox -Identity <Alias> -Type “Shared” -ProhibitSendReceiveQuota 5GB -ProhibitSendQuota 4.75GB -IssueWarningQuota 4.5GB

Add-MailboxPermission -Identity <Shared Mailbox Alias> -User <User/Group Alias> -AccessRights FullAccess -InheritanceType All

Add-RecipientPermission -Identity <Shared Mailbox Alias> -Trustee <User/Group Alias> -AccessRights SendAs -Confirm:$false

3. Revoke the license from the Office 365 Administration Console, or via PowerShell:

$MSOLSKU = (Get-MSOLUser -UserPrincipalName <UPN>).Licenses[0].AccountSkuId
Set-MsolUserLicense -UserPrincipalName <UPN> -RemoveLicenses $MSOLSKU

If you want to complete this process for a large number of mailboxes, the following script is an example of how you might do this. This script assumes you have already confirmed the mailboxes are under shared mailbox size limit. The script comes without warranty of any kind so please use at your own risk.

You will need an input file C:\temp\input.csv containing the userPrincipalNames for the mailboxes you wish to convert. e.g.

userPrincipalName
[email protected]
[email protected]
[email protected]

Now execute the script in an Office 365 PowerShell session:

Import-csv C:\temp\input.csv | foreach {
$UPN = $_.userPrincipalName
Set-Mailbox $UPN -Type “Shared” -ProhibitSendReceiveQuota 5GB -ProhibitSendQuota 4.75GB -IssueWarningQuota 4.5GB
$MSOLSKU = (Get-MSOLUser -UserPrincipalName $UPN).Licenses[0].AccountSkuId
Set-MsolUserLicense -UserPrincipalName $UPN -RemoveLicenses $MSOLSKU
}

Category:
Office 365

Join the conversation! 6 Comments

  1. Thanks very much for the useful article! One question: even though the ‘mailbox’ for the account moves from ‘mailboxes’ to ‘shared mailboxes, the MS365 ‘account’ seems to remain. When I deleted the ‘account’ (Admin / Office365 / Users and Groups) the Share Mailbox was also nuked (luckily I could retrieve it).

    • Don’t delete the accounts that are associated with shared mailboxes, simply remove the licenses that are associated with the shared mailbox account. As you found out, deleting the account will result in the mailbox being removed.

  2. Hi. I have manually run through your process for one user and works great. I would like to use the script method for the rest. I have a CSV file. But do I need to copy the text into notepad and save as a .ps1 file? I tried the copy and paste into powershell but It did not work.

    • You could save the script as a PS1 and execute it that way, though copying & pasting directly into PowerShell will also work.

      Make sure your CSV file is formatted correctly and saved in the location referenced by your script. In my example that is C:\temp\input.csv

  3. Shared Mailboxes can be 50 gigs before they need a lic.. always has been. not sure where the 5 is coming from, probably typo…

  4. I don’t know James. I have one that the max size in Exchange shows 4.75GB

Comments are closed.