Skip to content

Posts

Set Exchange Online Mailbox Sizes and Limits with PowerShell


By: Dataprise

Microsoft Exchange

Table of content

Need to change the default Exchange Online mailbox size limits for a single or multiple users? Follow the steps below for quick set-up:

How to set mailbox size limits for a single user

  1. Connect to Exchange Online by using remote PowerShell using the commands below:
  • $UserCredential = Get-Credential
  • $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/- Credential $UserCredential -AuthenticationBasic -AllowRedirection
  • Import-PSSession $Session -DisableNameChecking
Note: For additional information about getting connected to Exchange Online, go to the following Microsoft website: Connect to Exchange Online Using Remote PowerShell.

[image_with_animation image_url=”24229″ animation=”None” hover_animation=”none” alignment=”center” border_radius=”5px” box_shadow=”none” image_loading=”lazy-load” max_width=”100%” max_width_mobile=”default” margin_top=”5″ margin_bottom=”5″]

  1. Run the following PowerShell command to set the mailbox size for a single user:
  • Set-Mailbox -ProhibitSendQuota -ProhibitSendReceiveQuota -IssueWarningQuota

[image_with_animation image_url=”24230″ animation=”None” hover_animation=”none” alignment=”center” border_radius=”5px” box_shadow=”none” image_loading=”lazy-load” max_width=”100%” max_width_mobile=”default” margin_bottom=”10″]

  1. The placeholder represents a mailbox user’s UPN, email address, or GUID, and the placeholder represents a number in megabytes (MB), kilobytes (KB), or gigabytes (GB). For example, to set a mailbox size to 20 GB, to set the send limit at 19 GB, and to issue a warning at 18 GB, run the following command:
  • Set-Mailbox [email protected] -ProhibitSendQuota 19GB -ProhibitSendReceiveQuota 20GB -IssueWarningQuota 18GB

[image_with_animation image_url=”24231″ animation=”None” hover_animation=”none” alignment=”center” border_radius=”5px” box_shadow=”none” image_loading=”lazy-load” max_width=”100%” max_width_mobile=”default” margin_top=”5″ margin_bottom=”0″]

  1. Run the following command to check that the current list of quotas is attached to the mailbox:
  • Get-Mailbox | Select *quota

How to set mailbox size limits for multiple users

  1. Using the commands below, connect to Exchange Online by using remote PowerShell:
  • $UserCredential = Get-Credential
  • $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection
  • Import-PSSession $Session -DisableNameChecking
  1. Run the following PowerShell command to set the mailbox size for all the users in an organization:
  • Get-Mailbox | Set-Mailbox -ProhibitSendQuota <Value> -ProhibitSendReceiveQuota <Value> -IssueWarningQuota <Value>
  1. Additional filters can be applied to the Get-Mailbox cmdlet or to the Get-User cmdlet to control the users for whom the change is applied. The following is an example in which three cmdlets are used to filter the command to the sales department of an organization:
  • Get-User | where {$_.Department -eq “PEI IT”} | Get-Mailbox | Set-Mailbox -ProhibitSendQuota <Value> -ProhibitSendReceiveQuota <Value> -IssueWarningQuota <Value>

Brandon | PEIFollow our Microsoft Exchange category for more information on solutions to potential issues and workarounds!

Recent Tweets

INSIGHTS

Want the latest IT insights?

Subscribe to our blog to learn about the latest IT trends and technology best practices.