Set Mailbox Quotas in Office 365 using Windows PowerShell

 

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

Topic Last Modified: 2011-11-23

In Microsoft Office 365, Exchange Online administrators can use mailbox quotas to help control the size of mailboxes. Mailbox quotas are automatically set by the mailbox plan that's assigned to the mailbox, but you can override the default value in the mailbox plan or on individual mailboxes. You have to use Windows PowerShell to configure mailbox quotas.

The following mailbox quotas are available:

  • 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.
Before you begin

  • To learn how to install and configure Windows PowerShell and connect to the service, see Use Windows PowerShell in Exchange Online.
  • The mailbox quota values you specify can't exceed the default values specified by the mailbox plan. In Microsoft Office 365, mailbox plans correspond to the subscriptions and licenses that administrators purchase and assign in the Microsoft Office 365 portal.
  • The mailbox quota values are interdependent as follows:
    • The prohibit send quota must be less than the prohibit send receive quota.
    • The issue warning quota must be less than the prohibit send receive quota.
  • When you enter a mailbox quota value, qualify the value with one of the following units:
    • B (bytes)
    • KB (kilobytes)
    • MB (megabytes)
    • GB (gigabytes)
      Unqualified values or values entered in bytes are rounded up to the nearest kilobyte.
  • In the cloud-based service, you can't customize the descriptive error messages or warning messages used with mailbox quotas.
Set mailbox quotas on a mailbox

Run the following command:

Set-Mailbox <Identity> -ProhibitSendReceiveQuota <value> -ProhibitSendQuota <value> -IssueWarningQuota <value>

This example sets the following mailbox quota values:

  • Prohibit send receive quota   10 gigabytes
  • Prohibit send quota   9.75 gigabytes
  • Issue warning quota   9.5 gigabytes

To set these mailbox quota values for a user named Kim Akers, run the following command:

Set-Mailbox "Kim Akers" -ProhibitSendReceiveQuota 10GB -ProhibitSendQuota 9.75GB -IssueWarningQuota 9.5GB
Set mailbox quotas on many mailboxes

There are two ways to set mailbox quotas on a specific group of existing mailboxes:

  • Filter the mailboxes based on an existing attribute   This method assumes that the target mailboxes all share a unique filterable attribute. For example, the Title, Department, or one of the CustomAttribute1-15 attributes are the same for and unique to all the affected mailboxes. Note that some attributes, such as Title, Department, address information, and telephone number, are visible only when you use the Get-User cmdlet. Other attributes, such as CustomAttribute1-15, are visible only when you use the Get-Mailbox cmdlet.
  • Use a list of specific mailboxes   After you generate the list of specific mailboxes, you can use that list to set the mailbox quota values.
Filter the mailboxes based on an existing attribute

Run the following command:

<Get-Mailbox | Get-User> -ResultSize Unlimited -Filter <Filter> | Set-Mailbox -ProhibitSendReceiveQuota <value> -ProhibitSendQuota <value> -IssueWarningQuota <value>

This example gets a list of all user mailboxes where the Title property contains "Analyst" and sets the following mailbox quota values on those mailboxes:

  • Prohibit send receive quota   5 gigabytes
  • Prohibit send quota   4.75 gigabytes
  • Issue warning quota   4.5 gigabytes
Get-User -ResultSize Unlimited -Filter {(RecipientType -eq 'UserMailbox') -and (Title -like '*Analyst*')} | Set-Mailbox -ProhibitSendReceiveQuota 5GB -ProhibitSendQuota 4.75GB -IssueWarningQuota 4.5GB
Use a list of specific mailboxes

Run the following command:

Get-Content <text file> | Set-Mailbox -ProhibitSendReceiveQuota <value> -ProhibitSendQuota <value> -IssueWarningQuota <value>

For example, the following procedure uses the text file C:\My Documents\Change Quotas.txt to identify the mailboxes by their e-mail address. The text file must contain one e-mail address on each line like this:

akol@contoso.com
tjohnston@contoso.com
kakers@contoso.com

The following mailbox quota values are set on those mailboxes:

  • Prohibit send receive quota   5 gigabytes
  • Prohibit send quota   4.75 gigabytes
  • Issue warning quota   4.5 gigabytes
Get-Content "C:\My Documents\Change Quotas.txt" | Set-Mailbox -ProhibitSendReceiveQuota 5GB -ProhibitSendQuota 4.75GB -IssueWarningQuota 4.5GB
Change mailbox quotas in a mailbox plan

A mailbox plan is a template that automatically populates multiple mailbox properties and assigns default permissions to users. All mailbox creation is based on a mailbox plan. When you change the mailbox quotas in a mailbox plan, all new mailboxes you create that are assigned the mailbox plan receive the updated mailbox quota values.

To change the mailbox quota values in a mailbox plan, the following command:

Set-MailboxPlan <Identity> -ProhibitSendReceiveQuota <value> -ProhibitSendQuota <value> -IssueWarningQuota <value>

This example sets the following mailbox quota values:

  • Prohibit send receive quota   8 gigabytes
  • Prohibit send quota   7.75 gigabytes
  • Issue warning quota   7.5 gigabytes

To set these mailbox quota values for the ExchangeOnlineEnterprise mailbox plan, run the following command:

Set-MailboxPlan ExchangeOnlineEnterprise -ProhibitSendReceiveQuota 8GB -ProhibitSendQuota 7.75GB -IssueWarningQuota 7.5GB

When you change the mailbox quotas in a mailbox plan, the changes aren't applied to existing mailboxes that already have the mailbox plan assigned to them. In Microsoft Office 365, you can't change the mailbox plan that's assigned to an existing mailbox using the Exchange Control Panel or the Set-Mailbox cmdlet in Windows PowerShell. The only way to change the mailbox plan of an existing mailbox is to assign a different subscription or license in the Microsoft Office 365 portal.

Next steps

To view mailbox sizes, quotas, and quota status, see View Mailbox Sizes and Mailbox Quotas Using Windows PowerShell.

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