Updated 3 months ago

Export Mailbox Quota Report Using PowerShell

by Praba

5 min read

No Comments

Effectively managing Microsoft 365 mailbox storage is essential for maintaining optimal email performance and user satisfaction. When the mailbox storage quota is exceeded, it can lead to various problems, including delivery failures, slow performance, and increased storage costs.

Traditionally, admins rely on the Mailbox usage report in Microsoft 365 Admin Center or PowerShell cmdlets(like Get-MailboxStatistics or Get- MgReportMailboxUsageDetail) to monitor mailbox usage. While the Admin Center provides a basic overview, using ‘Get-MailboxStatistics’ cmdlet can become cumbersome for larger organizations. On the other hand, the ‘Get-MgReportMailboxUsageDetail’ cmdlet delivers extensive data in raw bytes, which can be difficult for admins to interpret.

To simplify this process and provide actionable insights, we’ve created a PowerShell script that efficiently exports mailbox usage and quota report into a clear CSV format. Before diving into the script, let’s get to know the terms related to mailbox quotas in Microsoft 365.

Mailbox Storage Quota Limits in Exchange Online

Exchange Online implements several quota limits to manage mailbox storage and email flow:

  • IssueWarningQuota: This is the limit where you’ll start getting warning messages from Exchange Online, telling you that mailbox is getting full.
  • ProhibitSendQuota: If your mailbox gets even fuller and hits this limit, you won’t be able to send any new emails.
  • ProhibitSendReceiveQuota: When your mailbox is completely full and reaches this limit, you won’t be able to send or receive any emails. Any emails sent to you will bounce back to the sender.

By running our PowerShell script, you’ll be able to generate a detailed Exchange mailbox quota report. This report not only highlights the quota status for all mailboxes but also breaks down the mailbox size in a humanized way. With this clear data at your fingertips, you can effortlessly review and increase mailbox storage quotas for the mailboxes!

Script Highlights:

  • The script exports mailbox usage quota report indicating if the usage exceeds the set limits or not.
  • Exports mailboxes that exceed the ‘Issue Warning’ quota.
  • Retrieves mailboxes surpassing the ‘Prohibit Send’ quota.
  • Helps to identify mailboxes nearing the ‘Warning’ quota.
  • Automatically installs the MS Graph PowerShell module upon your confirmation when it is not available on your machine.
  • The script can be executed with MFA enabled account too.
  • Exports report results to CSV.
  • The script is scheduler friendly.
  • Also, you can execute this script with certificate-based authentication (CBA).

Microsoft 365 Mailbox Usage Quota Report – Sample Report

The exported mailbox usage quota report looks like the screenshot below:

Exchange Mailbox quota report

The exported mailbox usage quota report contains the following attributes:

  • Display Name
  • User Principal Name
  • Storage Used
  • Storage Used in Bytes
  • Available Storage
  • Issue Warning Quota in GB
  • Prohibit Send Quota in GB
  • Prohibit Send/Receive Quota in GB
  • Quota Status
  • Recipient
  • Item Count
  • Is Mailbox Deleted

Export Exchange Mailbox Quota Report

  1. Download the script.
  2. Start the Windows PowerShell.
  3. Select any of the methods provided to execute the script.

Method 1: Run the script with MFA and non-MFA accounts.

The example provided enables you to export the mailbox usage quota report into a CSV file.

Method 2: Run the script using certificate-based authentication (CBA).

When you want to run the script unattended, you can choose this method.

To use certificates, you must register the app in Microsoft Entra and connect to MS Graph using certificate.

Note – Depending on your requirements, you can create a self-signed certificate. Before employing certificate-based authentication, it is crucial to register an application in Azure AD.

The method is scheduler friendly. You can schedule the script using the Task scheduler or Azure Automation.

Get the Most Out of Mailbox Quota Report in Microsoft 365

Efficient mailbox storage management can improve overall email efficiency, reduce costs, and enhance user satisfaction. Below are key actions for monitoring and managing mailbox quotas.

Export Mailbox Usage Quota Report in Microsoft 365

Monitoring mailbox size quota is crucial for admins to ensure smooth and avoid service interruptions. Oversized mailboxes can slow down email retrieval and sending, impacting user productivity. To fetch the overall report on Microsoft 365 mailbox size and storage quota limits, admins can run the following.

This script provides detailed information on the quota limits, used storage, and available storage for each mailbox in Exchange Online. If you find any crucial mailboxes that require additional storage, you can enable archive mailbox for a substantial increase in storage capacity.

Track Mailboxes Reaching ‘Issue Warning’ Storage Threshold

To ensure smooth email delivery and optimal system performance, it’s crucial for admins to monitor mailboxes approaching the ‘Issue Warning’ storage threshold. When users exceed this limit, they receive an error message stating, “You’ve exceeded the storage limit for your mailbox.” Admins can run the script specifying -OverIssueWarningQuota switch to identify mailboxes that have surpassed the ‘Issue Warning’ quota limit.

The exported report contains a list of mailboxes that have storage at or above the ‘Issue warning quota’.

Identify Mailboxes with Storage Over Prohibit Send Quota

When users exceed the ‘Prohibit Send’ quota, they cannot send new emails until space is freed up or the quota is increased. An error message will appear, stating: “Your mailbox can no longer send messages. To make room in your mailbox, delete any items you don’t need and empty your Deleted Items folder.”
To monitor and identify mailboxes that have exceeded the prohibit send quota, admins can make use of this -OverProhibitSendQuota switch.

The above example exports all the mailboxes with storage over the prohibit send quota.

Find the Mailboxes Nearing Warning Quota in Exchange Online

It’s crucial for admins to find the mailboxes nearing the warning quota to prevent users from receiving descriptive notification or error message from Microsoft Exchange. So, by using the – NearingWarningQuota parameter, admins can get the mailboxes nearing warning quota based on the specified percentage.

By running this script, admins can retrieve a list of mailboxes that have reached 90% of the warning quota limit. This allows admins to notify users to clean up their mailboxes or take other necessary actions to manage storage effectively.

Manage Exchange Online Mailbox Quota at Ease with AdminDroid

Are you frustrated with the complexities of PowerShell scripts for detailed mailbox storage quota reports in Microsoft 365? Say goodbye to the hassle of manual efforts! Meet AdminDroid’s Microsoft 365 reporting and auditing tool—a straightforward solution that delivers comprehensive Exchange Online reports and usage insights with ease.

  • Mailbox storage quota and size reports offered by AdminDroid:
  • Exchange Online Mailbox Quota
  • Mailboxes Over Warning Quota
  • Daily Mailbox Quota Statistics
  • Archived Mailbox with Over Warning Quota
  • Mailbox size and the storage-used percentage
  • Mailbox size over time

AdminDroid Mailbox Quota Report

In addition to these reports, AdminDroid offers 450+ Exchange Online reports which are designed to simplify mailbox auditing and email monitoring. AdminDroid’s Exchange Online auditing reports cover a wide range of critical aspects including mailbox permissions, forwarding configurations, threat protection activities, and more, empowering you to gain deep insights into Exchange Online events. Make your Exchange Online Management efficient with AdminDroid.

And that’s not all! AdminDroid goes above and beyond by providing 1800+ pre-built reports and 30+ smart dashboards to know about your Office 365 environment at a glance. This tool provides a 15-day premium version trial with all functionalities like reporting, scheduling, exporting, alerting, and compliance. Download and simplify your Microsoft 365 management with AdminDroid today!

I hope this blog is useful to check the mailbox size and quota report. If you have any queries, reach us through the comment section.

Share article