Windows OS Hub
  • Windows
    • Windows 11
    • Windows Server 2022
    • Windows 10
    • Windows Server 2019
    • Windows Server 2016
  • Microsoft
    • Active Directory (AD DS)
    • Group Policies (GPOs)
    • Exchange Server
    • Azure and Microsoft 365
    • Microsoft Office
  • Virtualization
    • VMware
    • Hyper-V
  • PowerShell
  • Linux
  • Home
  • About

Windows OS Hub

  • Windows
    • Windows 11
    • Windows Server 2022
    • Windows 10
    • Windows Server 2019
    • Windows Server 2016
  • Microsoft
    • Active Directory (AD DS)
    • Group Policies (GPOs)
    • Exchange Server
    • Azure and Microsoft 365
    • Microsoft Office
  • Virtualization
    • VMware
    • Hyper-V
  • PowerShell
  • Linux

 Windows OS Hub / Exchange / Mailbox Size and Quotas in Exchange 2019/2016 and Microsoft 365

March 15, 2024

Mailbox Size and Quotas in Exchange 2019/2016 and Microsoft 365

An on-prem Exchange or cloud Exchange Online (Microsoft 365) administrator must control user mailbox sizes. In this article, we’ll show how to get current mailbox sizes and set mailbox quotas for Exchange users. The article is divided into two parts: the first one tells how to configure mailbox size limits in an on-premises Exchange Server 2019/2016/2013, and the second one deals with mailbox size quotas in Microsoft 365 (Exchange Online).

Contents:
  • How to Get Mailbox Size in Exchange 2019/2016/2013?
  • Managing Mailbox Quotas in Exchange Server
  • How to Check Mailbox Size and Quotas in Exchange Online (Microsoft 365)?

How to Get Mailbox Size in Exchange 2019/2016/2013?

You can view the current size of a user mailbox in the Exchange Admin Center GUI (AEC). Find a user in the Recipients section, open its properties and go to the Mailbox Usage section. The screenshot shows that the current mailbox size is 26 MB (0% used of 100GB available).

get mailbox size using Exchange Admin Center

However, it is easier for me to use PowerShell Exchange Management Shellto get the size of user mailboxes in Exchange Server.
To get basic user mailbox statistics from an Exchange server, the Get-MailboxStatistics cmdlet is used. A user name is specified as an argument. When run without parameters, a user name (DisplayName), number of items in the mailbox (ItemCount), a mailbox size limit (StorageLimitStatus), and the last time the mailbox was accessed (LastLogonTime) are displayed.

Get-MailboxStatistics f.swaelen

To get the total size of a mailbox (the size of all items in it) and the size of removed items, run the command below:

Get-MailboxStatistics f.swaelen |ft DisplayName, TotalItemSize, ItemCount, totaldeleteditemsize, storagelimitstatus

Getting Mailbox Sizes with Get-MailboxStatistics PowerShell

Note. The real size of a mailbox it occupies in a mailbox database is calculated. All items in a mailbox, as well as Dumpster items from the Recoverable Items folder (stored in a mailbox for 14 days), are taken into account.

You can get a list of all mailboxes in a specific mailbox database:

Get-Mailbox -Database Mun-MBX1| Get-MailboxStatistics | ft displayname,totaldeleteditemsize,totalitemsize

Note. By default, Exchange cmdlets display only the first 1,000 results. You can remove the restriction using the –ResultSize:Unlimited option.

You can sort the table by the size of the user mailbox and display, for example, the top 10 largest mailboxes:

Get-Mailbox -Database MUN-MBX1| Get-MailboxStatistics | sort-object totalitemsize –descending | Select-Object  displayname, totalitemsize  -First 10

Exchange Top 10 Largest Mailboxes - PowerShell report

If you want to export the command output to a CSV file, add | Export-CSV top10mailbox.csv to the command.

Managing Mailbox Quotas in Exchange Server

To limit the size of Exchange Server mailboxes, quotas are used. You can configure a quota on the mailbox database or specific user mailbox level.

You can list the current Exchange mailbox database quotas as follows:

Get-MailboxDatabase -Identity MUN-MBX2| fl *quota

Quotas are set using three options:

  • IssueWarningQuota — a mailbox size when a user starts to get notifications about reaching the mailbox limit
  • ProhibitSendQuota — a mailbox size when sending emails is prohibited
  • ProhibitSendReceiveQuota — a mailbox size when both sending and receiving emails are blocked

To change the quota size for an Exchange database, the following command is used:

Set-MailboxDatabase -Identity MUN-MBX2 -IssueWarningQuota 19GB -ProhibitSendQuota 19.5GB -ProhibitSendReceiveQuota 20GB

You can also set database quotas from the Exchange Admin Center (EAC) graphical interface. Open Servers -> Databases -> select a database -> go to the Limits tab.

Configure mailbox database storage quotas

Exchange database quotas are applied to all mailboxes in the database. However, you can override quotas for specific user mailboxes. To apply personal quotas to a mailbox, you need to disable database quota inheritance (UseDatabaseQuotaDefaults = false) and set new limits:

Set-Mailbox -Identity f.swaelen -IssueWarningQuota 30GB -ProhibitSendQuota 40GB -ProhibitSendReceiveQuota 50GB -UseDatabaseQuotaDefaults $false

You can display personal mailbox quota settings:

Get-Mailbox -Identity f.swaelen | fl UseDatabaseQuotaDefaults,IssueWarningQuota,ProhibitSendQuota,ProhibitSendReceiveQuota

Or you can configure individual mailbox quotas through the EAC. Go to the Mailbox Usage tab in mailbox properties. Check Customize the settings for this mailbox and set new mailbox limits.

Configure storage quotas for a mailbox in Exchange Server

New quotas are not applied to a user mailbox immediately. You have to wait 2-3 hours or use the Update-StoreMailboxState username cmdlet to force synchronize the mailbox settings with the Active Directory user account.

The command below returns a list of mailboxes, whose sizes reach or exceed the quota:

Get-MailboxStatistics -Server MUN-MBX2| where{($_.StorageLimitStatus -contains“IssueWarning”) -or ($_.StorageLimitStatus -contains “ProhibitSend”)}

How to Check Mailbox Size and Quotas in Exchange Online (Microsoft 365)?

In Exchange Online (Microsoft 365), a mailbox size limit depends on the assigned plan and the mailbox type. Most Microsoft 365 mailboxes are limited to 50 GB. If you have assigned Microsoft E3 or E5 licenses to your users, the mailbox limit is increased to 100GB, but it is only 2GB for the F3 license.

Also, depending on the assigned plan a user may use an archive mailbox (In-Place Archive) with the limit of 50 GB. When using Exchange Online Plan 2 or Exchange Online Plan 1 (with Exchange Online Archiving add-on), the size of an archive mailbox may reach 1.5 TB if it grows up to 1 GB per day.

You can get the current size of an Exchange Online user mailbox in the Exchange Admin Center.

Check mailbox size and usage in Microsoft 365 or Exchange Online

You can also get information about the mailbox size and quota in PowerShell. Connect to your Exchange Online tenant using EXOv3 module cmdlet:

Connect-ExchangeOnline

To display information about the size of a user mailbox and the number of items in it:

Get-ExoMailboxStatistics maxbak|select ItemCount,TotalItemSize

Or information about all mailboxes in the tenant sorted by their size:

Get-ExoMailbox| Get-ExoMailboxStatistics |select DisplayName,ItemCount,TotalItemSize|Sort-Object -Property TotalItemSize –Descending

Find all mailboxes larger than 50GB:

Get-EXOMailbox | Get-EXOMailboxStatistics | Where-Object {[int64]($PSItem.TotalItemSize.Value -replace '.+\(|bytes\)') -gt "50GB"} | Sort-Object TotalItemSize -Descending | Select-Object DisplayName, ItemCount, TotalItemSize

The total size of all user mailboxes in your Microsoft 365 tenant:

((Get-EXOMailbox -ResultSize Unlimited | Get-EXOMailboxStatistics).TotalItemSize.Value.ToMB() | measure-object -sum).sum

Exchange Online Total Size and Items Count Get-EXOMailboxStatistics

You can list mailbox quota settings according to the assigned plan as shown below:

Get-EXOMailbox maxbak -PropertySets Quota

ProhibitSendQuota            : 99 GB (106,300,440,576 bytes)
ProhibitSendReceiveQuota     : 100 GB (107,374,182,400 bytes)
RecoverableItemsQuota        : 30 GB (32,212,254,720 bytes)
RecoverableItemsWarningQuota : 20 GB (21,474,836,480 bytes)
CalendarLoggingQuota         : 6 GB (6,442,450,944 bytes)
UseDatabaseQuotaDefaults     : False
IssueWarningQuota            : 98 GB (105,226,698,752 bytes)
RulesQuota                   : 256 KB (262,144 bytes)
ArchiveQuota                 : 110 GB (118,111,600,640 bytes)
ArchiveWarningQuota          : 100 GB (107,374,182,400 bytes)

Get Mailbox Quota and Usage in Microsoft 365

You can enable an archive mailbox for a user:

Enable-Mailbox -Identity maxbak -Archive

To make an archive automatically expand:

Enable-Mailbox -Identity maxbak -AutoExpandingArchive

You can display a list of mailboxes with the enabled archive and the size of archive mailboxes:

Get-ExoMailbox -Archive | Get-ExoMailboxStatistics |select DisplayName,ItemCount,TotalItemSize

0 comment
2
Facebook Twitter Google + Pinterest
Azure and Microsoft 365ExchangePowerShell
previous post
Windows Cannot Find the Microsoft Software License Terms
next post
How to Clean Up or Reset COM Port Numbers in Windows

Related Reading

Outlook Keeps Asking for Password on Windows

March 17, 2024

Get a List of Mailboxes a User Has...

March 15, 2024

How to Cleanup, Truncate or Move Log Files...

March 17, 2024

How to Manually Configure Exchange or Microsoft 365...

March 17, 2024

Fix: Microsoft Outlook Search Not Working on Windows...

March 17, 2024

How to Delete or Rename Default Mailbox Database...

March 17, 2024

Search and Delete Emails from User Mailboxes on...

March 15, 2024

How to Enable Maintenance Mode on Exchange Server

March 12, 2024

Leave a Comment Cancel Reply

join us telegram channel https://t.me/woshub
Join WindowsHub Telegram channel to get the latest updates!

Recent Posts

  • Map a Network Drive over SSH (SSHFS) in Windows

    May 13, 2025
  • Configure NTP Time Source for Active Directory Domain

    May 6, 2025
  • Cannot Install Network Adapter Drivers on Windows Server

    April 29, 2025
  • Change BIOS from Legacy to UEFI without Reinstalling Windows

    April 21, 2025
  • How to Prefer IPv4 over IPv6 in Windows Networks

    April 9, 2025
  • Load Drivers from WinPE or Recovery CMD

    March 26, 2025
  • How to Block Common (Weak) Passwords in Active Directory

    March 25, 2025
  • Fix: The referenced assembly could not be found error (0x80073701) on Windows

    March 17, 2025
  • Exclude a Specific User or Computer from Group Policy

    March 12, 2025
  • AD Domain Join: Computer Account Re-use Blocked

    March 11, 2025

Follow us

  • Facebook
  • Twitter
  • Telegram
Popular Posts
  • Outlook Keeps Asking for Password on Windows
  • Checking User Sign-in Logs in Entra ID (Microsoft 365)
  • How to Manually Configure Exchange or Microsoft 365 Account in Outlook 365/2019/2016
  • Search and Delete Emails from User Mailboxes on Exchange Server (Microsoft 365) with PowerShell
  • Fix: Microsoft Outlook Search Not Working on Windows 10/11
  • Blank Sign-in Screen in Office 365 Apps (Outlook, Teams, etc.)
  • Removing Built-in Teams Chat in Windows 11
Footer Logo

@2014 - 2024 - Windows OS Hub. All about operating systems for sysadmins


Back To Top