Exchange Online reporting

How to find shared mailboxes near 50 GB in Exchange Online

Find shared mailboxes close to the 50 GB limit with Exchange Online PowerShell, export Microsoft's mailbox usage report, or run Altivane's Shared Mailboxes report to see which need a licence.

By the Published

To find shared mailboxes near 50 GB in Exchange Online, list the shared mailboxes with Get-EXOMailbox, read each one's size with Get-EXOMailboxStatistics and keep those at or over a warning size, such as 45 GB. A shared mailbox without a licence is limited to 50 GB: at the limit it soon stops sending, and later stops receiving.

Choose the method that fits the job
MethodBest fit
PowerShellA CSV of shared mailboxes over a size you choose, largest first, with their quota.
Admin centreA one-off export of Microsoft's mailbox usage report, sorted in Excel.
AltivaneRecommended for regular reviews, with each mailbox rated against the 50 GB limit and its licence needs.

Before you start

Use an account in the Organization Management or Recipient Management role group, which Microsoft lists for mailbox settings. The admin centre method needs a role that can view usage reports, such as Reports Reader.

A shared mailbox can store up to 50 GB without a licence. An Exchange Online Plan 2 licence raises the limit to 100 GB, and an archive or litigation hold also needs a licence. Unlicensed shared mailboxes created before July 2018 have 100 GB, so read each mailbox's own quota. The script reads sizes as they are when it runs. The examples read and export; they change nothing.

Option 1

Find shared mailboxes near 50 GB with PowerShell

Install the module once, then connect and export the shared mailboxes at or over $warnGB. It reads each mailbox's statistics in turn.

PowerShell
# Install once, if the module is not already installed.
Install-Module ExchangeOnlineManagement -Scope CurrentUser
PowerShell
$ErrorActionPreference = 'Stop'
$warnGB = 45
Connect-ExchangeOnline -ShowBanner:$false
try {
    $query = @{ RecipientTypeDetails = 'SharedMailbox'; ResultSize = 'Unlimited' }
    $properties = 'ProhibitSendReceiveQuota', 'ArchiveStatus', 'LitigationHoldEnabled'
    $shared = @(Get-EXOMailbox @query -Properties $properties)
    $report = @(foreach ($mailbox in $shared) {
        $identity = $mailbox.UserPrincipalName
        if (-not $identity) { throw "No user principal name for $($mailbox.DisplayName)." }
        $bytes = $null
        try {
            $size = "$((Get-EXOMailboxStatistics -Identity $identity).TotalItemSize)"
            if ($size -match '\(([\d,]+) bytes\)') { $bytes = [int64]($Matches[1] -replace ',') }
        } catch {
            Write-Warning "The size of $identity couldn't be read: $($_.Exception.Message)"
        }
        if ($null -ne $bytes -and $bytes -ge $warnGB * 1GB) {
            [pscustomobject]@{
                Mailbox = $mailbox.DisplayName
                Address = $mailbox.PrimarySmtpAddress.ToString()
                SizeGB = [math]::Round($bytes / 1GB, 2)
                Quota = "$($mailbox.ProhibitSendReceiveQuota)"
                Archive = $mailbox.ArchiveStatus
                LitigationHold = $mailbox.LitigationHoldEnabled
            }
        }
    })
    if ($report.Count -eq 0) {
        Write-Output "No shared mailbox is at or over $warnGB GB."
    } else {
        $report | Sort-Object SizeGB -Descending |
            Export-Csv -Path './shared-mailboxes-near-limit.csv' -NoTypeInformation -Encoding utf8
        Write-Output "$($report.Count) shared mailboxes are at or over $warnGB GB."
    }
} finally {
    Disconnect-ExchangeOnline -Confirm:$false
}

The CSV has 1 row for each shared mailbox at or over the size, largest first, with its own quota. The script reads the byte count Exchange gives in brackets in TotalItemSize, so the result does not depend on how the size is rounded. Change $warnGB to widen or narrow the list. A mailbox whose size cannot be read is named in a warning and left out.

Check a single mailbox

Reconnect with Connect-ExchangeOnline, then read 1 shared mailbox's size and quota. The export above disconnects when it finishes.

PowerShell
# Run while connected to Exchange Online. Replace the example mailbox.
Get-EXOMailboxStatistics -Identity 'shared@example.com' |
    Select-Object DisplayName, TotalItemSize, ItemCount
Get-EXOMailbox -Identity 'shared@example.com' -Properties ProhibitSendReceiveQuota |
    Select-Object DisplayName, ProhibitSendReceiveQuota

Option 2

Review shared mailbox sizes in the admin centre

  1. Open the Microsoft 365 admin centre for the correct tenant.
  2. Go to Reports > Usage, and under Reports select Exchange.
  3. On the Email activity tab, select View More, then choose Exchange > Mailbox usage from the list.
  4. Choose Export to download the usage of every mailbox as a CSV file.
  5. In Excel, filter the recipient type to shared mailboxes and sort by storage used, largest first.

This suits a one-off look. Usage reports run a day or more behind, and they do not say whether a mailbox has a licence. To see that, find the mailbox under Users > Active users, where a shared mailbox with no licence shows as Unlicensed.

Common questions

What happens when a shared mailbox reaches 50 GB?

Microsoft says it can still receive email for some time but cannot send new email. After that it stops receiving too, and senders get a non-delivery report. Assign an Exchange Online Plan 2 licence to raise the limit to 100 GB, or remove large items to bring it under 50 GB.

Why does a mailbox show a 100 GB quota without a licence?

Unlicensed shared mailboxes created before July 2018 were given 100 GB. The script and Altivane read each mailbox's own quota, so they show the limit that applies to it.

Can people sign in to a shared mailbox directly?

A shared mailbox has a user account with a password the system set, and that account is active until you block it. To check every shared mailbox, see how to check shared mailbox sign-in in Exchange Online.

Microsoft references

Technical references checked on 6 November 2026. The example scripts have been reviewed and syntax checked; they have not been run against a live tenant.

Talk to us about Altivane

Questions, or pricing? Get in touch.

Contact us