Allocating the proper storage space is one of the important part in the management of the Exchange Server. This can be done by monitoring the user mailbox and allocating the required space to it. The whole process of allocating the space can be easily accomplished using PowerShell Cmdlets. In this article we will learn these Powershell Cmdlets. So lets start:
The Cmdlet given below is used to limit the Mailboxes for single user.
General Syntax: –
Set-Mailbox <UserID> -ProhibitSendQuota <Value> -ProhibitSendReceiveQuota <Value> -IssueWarningQuota <Value>
Example: –
The example given below is used to limit the mailbox of Mark to a size of 30 GB and will warn Mark when the size of his mailbox reaches at the size of 25 GB and will limit on sending messages at 27 GB
Set-Mailbox mark@mailtest.com -ProhibitSendQuota 27GB -ProhibitSendReceiveQuota 30GB -IssueWarningQuota 25GB
For multiple users the same command is used with Get-User Cmdlet along with a filter. The Cmdlet given below is used to set mailbox size limit for the Managing Department
Get-User | where {$_.Department -eq “Manager Service”} | Get-Mailbox | Set-Mailbox -ProhibitSendQuota 27GB -ProhibitSendReceiveQuota 30GB -IssueWarningQuota 25GB
If you want to apply the size limit for the whole organization, then you can use the command as given below
Set-Mailbox -ProhibitSendQuota 27GB -ProhibitSendReceiveQuota 30GB -IssueWarningQuota 25GB
With the help of commands discussed above,you can easily limit the size of a single or multiple users. Now lets say you want to check the status of User’s Mailbox. How will you do it?
Don’t worry, Here is the simple commands with which you can easily perform the required operation.
Get-MailboxStatistics mark@mailtest.com | Format-List StorageLimitStatus,TotalItemSize<b></b>
As per your requirement you can refine the results, for example, lets say you want to check out those mailboxes which are not below their limit: –
Get-Mailbox -ResultSize Unlimited | Get-MailboxStatistics | where-object {$_.StorageLimitStatus -notlike “BelowLimit*”}
Managing mailbox size is one of the major issues for system administrators. The blog will help you a lot for the same using PowerShell commands. In case if you are facing any difficulty, Please comment below, We will sort out your query as soon as possible