View Mailbox Sizes and Mailbox Quotas Using Windows PowerShell

 

Applies to: Office 365 for professionals and small businesses, Office 365 for enterprises, Live@edu

Topic last modified: 2011-12-12

 

Mailbox quotas help control the size of mailboxes. Mailbox quotas are automatically set by the mailbox plan that's assigned to the mailbox. The following mailbox quotas are used:

  • Issue warning quota   If the mailbox size reaches or exceeds the specified limit, the user receives a descriptive warning message.

  • Prohibit send quota   If the mailbox size reaches or exceeds the specified limit, new messages can't be sent from the mailbox, and the user receives a descriptive error message.

  • Prohibit send receive quota   If the mailbox size reaches or exceeds the specified limit, the mailbox can't send or receive new messages. Any messages sent to the mailbox are returned to the sender with a descriptive error message.

    Note   The prohibit send receive quota effectively determines the maximum size of the mailbox.

In Live@edu organizations, you can't modify the mailbox quotas in mailbox plans or on individual mailboxes, but you can in Microsoft Office 365. For more information, see Set Mailbox Quotas in Office 365 using Windows PowerShell.

Even in organizations where you can't modify the mailbox quotas, you can still monitor mailbox sizes and the quota status for the users in your cloud-based organization. For example, would you like to know which mailboxes have reached their prohibit send receive quota? Or view the mailbox size and quota status of a specific mailbox? No problem!

Here's what you can do using the Get-MailboxStatistics cmdlet in Windows PowerShell:

Before you begin

  • To learn how to install and configure Windows PowerShell and connect to the service, see Use Windows PowerShell in Exchange Online.

  • When you use the Get-MailboxStatistics cmdlet, be aware of the following behavior:

    • Certain types of mailboxes, for example, discovery mailboxes, equipment mailboxes, shared mailboxes, and archive mailboxes may display warnings and no values if no one has ever signed in to the mailbox. These warnings are for display only. When you record the results to a file, the values are recorded, and the warnings are omitted.

    • If you round a size value to the nearest megabyte, and restrict the results to two decimal places, very small values measured in bytes or kilobytes will likely appear as zero. For example, 4 kilobytes is 0.0039 megabytes, which when rounded to two decimal places, is zero (4/1024).

  • The mailbox size and mailbox quotas are visible in the Mailbox Usage section of the mailbox properties in the Exchange Control Panel.

  • Users can view the current size and quota status of their own mailbox using one of the following methods:

    • Outlook 2010   In the Mailbox Cleanup section in File > Info. For detailed mailbox size information, click Cleanup Tools > Mailbox Cleanup > View Mailbox Size.

    • Outlook Web App   In the Mail view, hover over your name at the top of the folder list. Note that this doesn't work in the light version of Outlook Web App.

View the size and quota status of a specific mailbox

Run the following command:

Get-MailboxStatistics <Identity> | Format-List StorageLimitStatus,TotalItemSize,TotalDeletedItemSize,ItemCount,DeletedItemCount

For example, to view the current size and quotas status the mailbox belonging to a user named Tamara Johnston, run the following command:

Get-MailboxStatistics "Tamara Johnston" | Format-List StorageLimitStatus,TotalItemSize,TotalDeletedItemSize,ItemCount,DeletedItemCount

Top of page

View the size and quota status of all mailboxes

The following command retrieves the following information for all mailboxes:

  • The display name of the mailbox

  • The quota status of the mailbox

  • The mailbox size in megabytes (MB) rounded up to two decimal places

  • The Recoverable Items folder size in megabytes (MB) rounded up to two decimal places

  • The number of items in the mailbox

  • The number of items in the Recoverable Items folder

The results are sorted by mailbox size from largest to smallest, and they are exported to a CSV file named "C:\My Documents\All Mailboxes.csv".

Get-Mailbox -ResultSize Unlimited | Get-MailboxStatistics | Select DisplayName,StorageLimitStatus,@{name="TotalItemSize (MB)";expression={[math]::Round((($_.TotalItemSize.Value.ToString()).Split("(")[1].Split(" ")[0].Replace(",","")/1MB),2)}},@{name="TotalDeletedItemSize (MB)";expression={[math]::Round((($_.TotalDeletedItemSize.Value.ToString()).Split("(")[1].Split(" ")[0].Replace(",","")/1MB),2)}},ItemCount,DeletedItemCount | Sort "TotalItemSize (MB)" -Descending | Export-CSV "C:\My Documents\All Mailboxes.csv" -NoTypeInformation

Top of page

View only mailboxes that have exceeded their mailbox quotas

To view the size and quota status of only those mailboxes that are larger than their configured mailbox quota values, and to export the results to a CSV file named "C:\My Documents\Exceeded Quotas.csv", run the following command:

Get-Mailbox -ResultSize Unlimited | Get-MailboxStatistics | where {$_.StorageLimitStatus -notlike "BelowLimit*"} | Select DisplayName,StorageLimitStatus,@{name="TotalItemSize (MB)";expression={[math]::Round((($_.TotalItemSize.Value.ToString()).Split("(")[1].Split(" ")[0].Replace(",","")/1MB),2)}},@{name="TotalDeletedItemSize (MB)";expression={[math]::Round((($_.TotalDeletedItemSize.Value.ToString()).Split("(")[1].Split(" ")[0].Replace(",","")/1MB),2)}},ItemCount,DeletedItemCount | Sort "TotalItemSize (MB)" -Descending | Export-CSV "C:\My Documents\Exceeded Quotas.csv" -NoTypeInformation

Top of page

View all quotas assigned to a mailbox

Run the following command:

Get-Mailbox <Identity> | Format-List *Quota

For example, to view the mailbox quotas assigned to the mailbox of a user named Tamara Johnston, run the following command:

Get-Mailbox "Tamara Johnston" | Format-List *Quota

Note   As explained earlier, all the following values for mailbox quotas are set by the mailbox plan that’s assigned to the mailbox. To view the mailbox quota values by mailbox plan, run the command: Get-MailboxPlan | Format-List DisplayName,*Quota.

Top of page

Archive mailboxes

Note   Archive mailboxes aren't available in Live@edu organizations.

In Microsoft Office 365 organizations, you can also view the size and quota status of archive mailboxes. The size of an archive mailbox isn't counted in the size of the user's mailbox. The archive mailbox has its own separate and unconfigurable quotas that are set by the mailbox plan that's assigned to the user's mailbox. These quotas are the ArchiveQuota and the ArchiveWarningQuota.

Top of page

View the size and quota status of an archive mailbox

Run the following command:

Get-MailboxStatistics <Identity> -Archive | Format-List DisplayName,StorageLimitStatus,TotalItemSize,TotalDeletedItemSize,ItemCount,DeletedItemCount

For example, to view the current mailbox size and quota status of the archive mailbox of a user named Kim Akers, run the following command:

Get-MailboxStatistics "Kim Akers" -Archive | Format-List DisplayName,StorageLimitStatus,TotalItemSize,TotalDeletedItemSize,ItemCount,DeletedItemCount

Note   The value of <Identity> is the identity of the user's mailbox, not the identity of the archive mailbox.

Top of page

View the size and quota status of all archive mailboxes

The following command retrieves the following information for all archive mailboxes:

  • The display name of the archive mailbox

  • The quota status of the archive mailbox

  • The archive mailbox size in megabytes (MB) rounded up to two decimal places

The Recoverable Items folder size in megabytes (MB) rounded up to two decimal places. The results are sorted by mailbox size from largest to smallest, and they are exported to a CSV file named "C:\My Documents\All Archive Mailboxes.csv".

Get-Mailbox -Archive -ResultSize Unlimited | Get-MailboxStatistics -Archive | Select DisplayName,StorageLimitStatus,@{name="TotalItemSize (MB)";expression={[math]::Round((($_.TotalItemSize.Value.ToString()).Split("(")[1].Split(" ")[0].Replace(",","")/1MB),2)}},@{name="TotalDeletedItemSize (MB)";expression={[math]::Round((($_.TotalDeletedItemSize.Value.ToString()).Split("(")[1].Split(" ")[0].Replace(",","")/1MB),2)}},ItemCount,DeletedItemCount | Sort "TotalItemSize (MB)" -Descending | Export-Csv "C:\My Documents\All Archive Mailboxes.csv" -NoTypeInformation

Top of page

An explanation of the values returned by Get-MailboxStatistics

Let's take a look at the values you should know about:

  • StorageLimitStatus   This value indicates the quota status of the mailbox. The following values are used:

    • BelowLimit   The mailbox size is less than the issue warning quota.

    • IssueWarning   The mailbox size is greater than or equal to the issue warning quota, but is less than the prohibit send quota.

    • ProhibitSend   The mailbox size is greater than or equal to the prohibit send quota, but is less than the prohibit send receive quota.

    • MailboxDisabled   The mailbox size is greater than or equal to the prohibit send receive quota.

  • TotalItemSize and ItemCount   These values indicate the size and number of items currently in the mailbox. The value of TotalItemSize is the size of the mailbox. This value is compared to the mailbox quotas that are configured on the mailbox.

  • TotalDeletedItemSize and DeletedItemCount   These values don't indicated the size and number of items in the Deleted Items folder. Instead, they indicate the size and number of items in the hidden Recoverable Items folder in the mailbox. The Recoverable Items folder is also known as the dumpster. Items enter the Recoverable Items folder in one of the following ways:

    • Deleting items from the Deleting Items folder.

    • Using Shift+Delete to permanently delete mailbox items.

    The size of the Recoverable Items folder isn't counted in the size of the mailbox. The Recoverable Items folder has its own separate and unconfigurable quotas that are set by the mailbox plan that's assigned to the mailbox. These quotas are the RecoverableItemsQuota and the RecoverableItemsWarningQuota.

    Note   Items in the Recoverable Items folder are retained for 14 days by default and then purged by Microsoft Exchange. In Microsoft Office 365 for enterprises, when a mailbox is put on litigation hold, the Recoverable Items folder isn't purged and items in this folder are retained indefinitely.

Top of page

 
Related help topics
Loading...
No resources were found.