Get Exchange Mailbox Quota Status using PowerShell

Back in the old days of Microsoft Exchange, when quota was applied to a mailbox we had a way to check the status of the quota using the "Get-MailboxStatistics" cmdlet and the property "StorageLimitStatus". On the newer versions of Exchange, this property does not contain a value since it has an impact on the performance against Active Directory (read more here).

In order to overcome this issue - and since I'm often checking for the quota status - I've decided to create a PowerShell function. The function is called "Get-MailboxQuotaStatus" and it's available with my Exchange module since version 2.4.1.

What it actually does is to check if the mailbox follows the database quotas or it's own and then compare the quota values against the size of the mailbox. The objects that this function returns are consisted of the mailbox object that is returned from the "Get-Mailbox" cmdlet and the status of the quota.

The possible values for the "QuotaStatus" property are:
  • BelowLimit
  • ProhibitSend
  • ProhibitSendReceive
  • NoChecking
These are also the values of the "Microsoft.Exchange.Data.Mapi.StorageLimitStatus" enumeration in addition to "MailboxDisabled".

Let's see some examples:

[PS]C:\>Get-MailboxStatistics cpolydorou | fl stor*

StorageLimitStatus :

[PS] C:\>Get-MailboxQuotaStatus -Identity cpolydorou

Mailbox            QuotaStatus
-------            -----------
Christos Polydorou NoChecking


[PS] C:\>get-mailbox | Select-Object -First 2 | Get-MailboxQuotaStatus

Mailbox            QuotaStatus
-------            -----------
Administrator      BelowLimit
Christos Polydorou NoChecking


[PS] C:\>Get-MailboxQuotaStatus cpolydorou | % Mailbox

Name               Alias      ServerName    ProhibitSendQuota
----               -----      ----------    -----------------
Christos Polydorou cpolydorou exchange2013a Unlimited


[PS] C:\>[enum]::GetNames('Microsoft.Exchange.Data.Mapi.StorageLimitStatus')
BelowLimit
IssueWarning
ProhibitSend
NoChecking
MailboxDisabled
[PS] C:\>

First, we get the StorageLimitStatus of my mailbox witch is empty. On the first example we get the quota status for the mailbox cpolydorou and on the second we get the quota status for multiple mailboxes using the pipeline. On the third example, we expand the mailbox property and on the fourth we display the values of the StorageLimitStatus enumeration.

I hope you'll find this function useful! Have fun!

Popular posts from this blog

Domain Controller Machine Password Reset

Managing Active Directory User Certificates using PowerShell

Configuring a Certificate on Exchange Receive Connector