Managing Exchange Online Mailbox Size Limits with PowerShell

An important part of managing any Microsoft Exchange deployment, whether on-premises or online, is the appropriate allocation of storage space. An important task related to that is monitoring and limiting the size of user mailboxes. Thankfully, you’ll find that these tasks in Exchange Online are easily done with just a few simple PowerShell commands. In this article I’ll walk you through managing Exchange Online mailbox size limits with a handful of useful Windows PowerShell cmdlets.

Managing Exchange Online Mailbox Size Limits with PowerShell

PowerShell can be a useful tool to help you manage Exchange Online Mailbox Size Limits.
(Image: Jeff James)

Setting Exchange Mailbox Size Limits for a Single User

1. Let’s start with setting limits. We can do this for one user at a time or groups of users. First the command for changing the size limit for a single user using the following PowerShell command:

​ Set-Mailbox <UserID> -ProhibitSendQuota <Value> -ProhibitSendReceiveQuota <Value> -IssueWarningQuota <Value>

2. Here is the command we would use if we wanted to limit Robert Williams’ mailbox to a size of 24 GB with a warning at 20 GB and a limit on sending messages at 22 GB:

​Set-Mailbox [email protected] -ProhibitSendQuota 22GB -ProhibitSendReceiveQuota 24GB -IssueWarningQuota 20GB

[Ensure mailbox license supports this quota — e.g., E3/E5 in Microsoft 365 allows up to 100GB]

Setting Mailbox Size Limits for Multiple Users

1. To make the same change for multiple users we will add the Get-User cmdlet along with a filter. If we wanted to set a specific quota for the Customer Service department we might use a command like this:

​ Get-User | where {$_.Department -eq "Customer Service"} | Get-Mailbox | Set-Mailbox -ProhibitSendQuota 18 GB -ProhibitSendReceiveQuota 20GB -IssueWarningQuota 16GB

[Modern best practice is to filter directly on Get-Mailbox when possible — applies in PowerShell 7+]

2. To apply a size limit for your entire organization simply use a command with this syntax:

​ Set-Mailbox -ProhibitSendQuota <Value> -ProhibitSendReceiveQuota <Value> -IssueWarningQuota <Value>

Reporting Exchange Online Mailbox Storage Statistics

Now that you know how to quickly change size limits and quotas for users in Exchange Online, let’s learn how to use the Get-MailboxStatistics cmdlet to gather information about mailbox storage. To start off we will take a look at the quota we just assigned to Robert Williams as well as the total size of all mailbox items:

​ Get-MailboxStatistics [email protected] | Format-List StorageLimitStatus,TotalItemSize

We do not need to limit ourselves to single users. You can also use Get-MailboxStatistics to review the usage statistics for your entire organization:

​ Get-Mailbox -ResultSize Unlimited | Get-MailboxStatistics | Format-List DisplayName, StorageLimitStatus, TotalItemSize 

You can refine your results by looking only for those mailboxes that are not below their limit:

​ Get-Mailbox -ResultSize Unlimited | Get-MailboxStatistics | where-object {$_.StorageLimitStatus -notlike "BelowLimit*"}

Export Mailbox Size Data to Excel

You can even export your results to a Microsoft Excel .CSV file with the following PowerShell cmdlet:

​ Export-Csv "C:NotBelowLimit.csv"

Managing Exchange mailbox size limits and quotas is an essential part of any Exchange administrator’s job, but when you learn how to use PowerShell with Exchange Online it does not have to be a tedious time-waster. Now you can quickly finish simple tasks — such as assigning limits and gathering data on organization-wide Exchange Online usage – with only a few simple PowerShell cmdlets.  [As of 2025, consider using Exchange Online PowerShell v3 module for improved performance and REST support]

FAQs

What is the default Exchange mailbox size limit in Microsoft 365?

The default Exchange mailbox size limit in Microsoft 365 is 50GB for most enterprise plans, while premium plans can offer up to 100GB of storage space. Archive mailboxes provide additional storage beyond these standard limits.

Can I customize Exchange mailbox size limits for different subscription tiers?

Yes, administrators can set different Exchange mailbox size limits based on license types and user roles, allowing for flexible storage allocation across various subscription tiers within the organization.

What happens when an Exchange mailbox size limit is reached?

When users hit their Exchange mailbox size limit, they cannot send or receive new emails, existing messages remain accessible, and automatic notifications are sent to both the user and administrator for necessary action.

How does Exchange mailbox size limit affect shared mailboxes?

Shared mailboxes have a standard Exchange mailbox size limit of 50GB without requiring a separate license, but can be expanded to 100GB with an appropriate license assignment.

What are the best practices for managing Exchange mailbox size limits?

Regular monitoring of usage patterns, implementing email retention policies, using archive mailboxes, and setting appropriate Exchange mailbox size limits based on user roles are recommended best practices for effective mailbox management.

To see additional PowerShell resources for managing Microsoft Exchange Online, check out the following: