How to get or increase Inbox Rules Quota in Exchange Online

Introduction

This script is used to help administrator to get or increase the Inbox Rules Quota of end users' mailbox.

Scenarios

This script is used to help administrator to get or increase the Inbox Rules Quota of end users' mailbox.

Script

You can use this script in the following way.

1. Open Windows PowerShell.

2. Type the one command< Script Path> at the Windows PowerShell Console.

For example, type C:\Script\ GetSetInboxRuleQuotainEXO

Here are some code snippets for your references.

PowerShell
Edit|Remove
[regex]$regex = "\d+(?=\sKB)"
Foreach($Quota in $Quotaes)
{
    $Quo = [Int]$regex.Match($Quota.RulesQuota).Value
    $Quo = $Quo + 16
    if($Quo -gt 256)
    {
        $Quo = 256
    }
    $Quota.RulesQuota = "$Quo KB" 
    Set-Mailbox -Identity $Quota.PrimarySmtpAddress -RulesQuota $Quota.RulesQuota
}

Examples

Example1: Get the end users' mailbox rules quota.

GetSetInboxRuleQuotainEXO.ps1 -Credential $Cred –GetRulesQuota

 

Result Screenshot:

 

 Example2: Increase 16 KB of the end users' mailbox rules quota.

GetSetInboxRuleQuotainEXO.ps1 -Credential $Cred –IncreaseRulesQuota

 

Prerequisites

Exchange Online
Windows PowerShell 2.0

 

Microsoft All-In-One Script Framework is an automation script sample library for IT Professionals. The key value that All-In-One Script Framework is trying to deliver is Scenario-Focused Script Samples driven by IT Pros' real-world pains and needs. The team is monitoring all TechNet forums, IT Pros' support calls to Microsoft, and script requests submitted to TechNet Script Repository. We collect frequently asked IT scenarios, and create script samples to automate the tasks and save some time for IT Pros. The team of All-In-One Script Framework sincerely hope that these customer-driven automation script samples can help our IT community in this script-centric move.