Skip to content

Get shared mailbox size in Office 365 with PowerShell

How to connect to Exchange Online and get shared mailbox size in Office 365? One of the reasons is that you had a migration to Office 365, and you want to check the shared mailbox size in Office 365. This article will teach you how to list shared mailbox size with PowerShell in Office 365.

Did you know that a free shared mailbox is limited to 50 GB? Assign a license to the shared mailbox, or that specific mailbox can’t send and receive emails!

Connect to Exchange Online PowerShell

Before you start, Connect to Exchange Online PowerShell.

PS C:\> Connect-ExchangeOnline -UserPrincipalName admin@exoip.com

After that, check if you did connect to Exchange Online. An excellent way is to run the Get-EXOMailbox cmdlet and list five shared mailboxes.

PS C:\> Get-EXOMailbox -RecipientTypeDetails SharedMailbox -ResultSize 5 | Select-Object DisplayName

DisplayName
-----------
IT
Support
HR
Info
Sales

Get shared mailbox size with PowerShell in Office 365

Make use of the -RecipientTypeDetails parameter to filter the results on shared mailboxes. Run the command to get all shared mailboxes size in Office 365. Note that it will sort the results on TotalItemSize.

PS C:\> Get-EXOMailbox -RecipientTypeDetails SharedMailbox -ResultSize Unlimited | Get-EXOMailboxStatistics | Sort-Object -Property TotalItemSize -Descending | Select-Object DisplayName,ItemCount,TotalItemSize


DisplayName       ItemCount TotalItemSize                  
-----------       --------- -------------                  
HR                    56063 65.45 GB (70,281,303,270 bytes)
IT                   234921 50.09 GB (53,785,897,281 bytes)
Sales                176251 36.64 GB (39,343,435,427 bytes)
Support               34444 34.06 GB (36,576,754,053 bytes)
Info                  12978 19.28 GB (20,699,344,102 bytes)
Supplier              22546 19.22 GB (20,632,979,599 bytes)
Store                 20607 16.58 GB (17,804,464,845 bytes)

Only a couple of shared mailboxes are above 50 GB in size. We already assigned a license to the shared mailboxes HR and IT.

Read more: How to get mailbox size greater than in Microsoft 365 »

A user must have an Exchange Online license to access a shared mailbox, but the shared mailbox doesn’t require a separate license. Without a license, shared mailboxes are limited to 50 GB. To increase the shared mailbox size limit to 100 GB, you must assign an Exchange Online Plan 2 license or an Exchange Online Plan 1 license with an Exchange Online Archiving add-on license.

Keep reading: Check which mailboxes are in sync with Office 365 »

Conclusion

In this article, you learned how to get shared mailbox size in Office 365 with PowerShell. Connect to Exchange Online and run the cmdlet. It’s an excellent cmdlet to retrieve the size of the shared mailbox. Keep in mind that a shared mailbox maximum size is 50 GB, without an Exchange Online license assigned.

Did you enjoy this article? You may also like Bulk move AD users to another OU with PowerShell. Don’t forget to follow us and share this article.

ALI TAJRAN

ALI TAJRAN

ALI TAJRAN is a passionate IT Architect, IT Consultant, and Microsoft Certified Trainer. He started Information Technology at a very young age, and his goal is to teach and inspire others. Read more »

This Post Has 2 Comments

  1. Hi,

    I hope you are well,
    I need to get a report of all shared mailbox in our 365 Tenant, but in the report I need it to show, Display Name, Primary SMTP, Alias and Size of the mailbox in GB or MB please.
    Please could you advise?

Leave a Reply

Your email address will not be published. Required fields are marked *