Windows OS Hub
  • Windows Server
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
    • Windows Server 2012 R2
    • Windows Server 2008 R2
    • SCCM
  • Active Directory
    • Active Directory Domain Services (AD DS)
    • Group Policies
  • Windows Clients
    • Windows 11
    • Windows 10
    • Windows 8
    • Windows 7
    • Windows XP
    • MS Office
    • Outlook
  • Virtualization
    • VMWare
    • Hyper-V
    • KVM
  • PowerShell
  • Exchange
  • Cloud
    • Azure
    • Microsoft 365
    • Office 365
  • Linux
    • CentOS
    • RHEL
    • Ubuntu
  • Home
  • About

Windows OS Hub

  • Windows Server
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
    • Windows Server 2012 R2
    • Windows Server 2008 R2
    • SCCM
  • Active Directory
    • Active Directory Domain Services (AD DS)
    • Group Policies
  • Windows Clients
    • Windows 11
    • Windows 10
    • Windows 8
    • Windows 7
    • Windows XP
    • MS Office
    • Outlook
  • Virtualization
    • VMWare
    • Hyper-V
    • KVM
  • PowerShell
  • Exchange
  • Cloud
    • Azure
    • Microsoft 365
    • Office 365
  • Linux
    • CentOS
    • RHEL
    • Ubuntu

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

February 20, 2023 ExchangeMicrosoft 365PowerShell

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 to get the size of user mailboxes in Exchange Server. Open EMS (Exchange Management Shell) or connect to your Exchange server remotely.

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), a 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, which 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 the cmdlet below:

Connect-ExchangeOnline

To display information about a 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
previous post
Settings App Won’t Open/Crashes on Windows 10/11
next post
How to Clean Up or Reset COM Port Numbers in Windows

Related Reading

Zabbix: How to Get Data from PowerShell Scripts

October 27, 2023

Tracking Printer Usage with Windows Event Viewer Logs

October 19, 2023

PowerShell: Configure Certificate-Based Authentication for Exchange Online (Azure)

October 15, 2023

How to Query and Change Teams User Presence...

October 8, 2023

Installing Language Pack in Windows 10/11 with PowerShell

September 15, 2023

Leave a Comment Cancel Reply

Categories

  • Active Directory
  • Group Policies
  • Exchange Server
  • Microsoft 365
  • Azure
  • Windows 11
  • Windows 10
  • Windows Server 2022
  • Windows Server 2019
  • Windows Server 2016
  • PowerShell
  • VMWare
  • Hyper-V
  • Linux
  • MS Office

Recent Posts

  • Zabbix: How to Get Data from PowerShell Scripts

    October 27, 2023
  • Tracking Printer Usage with Windows Event Viewer Logs

    October 19, 2023
  • PowerShell: Configure Certificate-Based Authentication for Exchange Online (Azure)

    October 15, 2023
  • Reset Root Password in VMware ESXi

    October 12, 2023
  • How to Query and Change Teams User Presence Status with PowerShell

    October 8, 2023
  • How to Increase Size of Disk Partition in Ubuntu

    October 5, 2023
  • How to Use Ansible to Manage Windows Machines

    September 25, 2023
  • Installing Language Pack in Windows 10/11 with PowerShell

    September 15, 2023
  • Configure Email Forwarding for Mailbox on Exchange Server/Microsoft 365

    September 14, 2023
  • How to View and Change BIOS (UEFI) Settings with PowerShell

    September 13, 2023

Follow us

  • Facebook
  • Twitter
  • Telegram
Popular Posts
  • Outlook Keeps Asking for Password on Windows
  • How to Manually Configure Exchange or Microsoft 365 Account in Outlook 365/2019/2016
  • FAQ: Licensing Microsoft Exchange Server 2019/2016
  • Whitelist Domains and Email Addresses on Exchange Server and Microsoft 365
  • Moving Exchange Mailboxes to Different Database
  • How to Cleanup, Truncate or Move Log Files in Exchange Server 2013/2016/2019?
  • Search and Delete Emails from User Mailboxes on Exchange Server (Microsoft 365) with PowerShell
Footer Logo

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


Back To Top