diff --git a/Calendar/Get-RBASummary.ps1 b/Calendar/Get-RBASummary.ps1 index e46636ffde..9d63b1f7c1 100644 --- a/Calendar/Get-RBASummary.ps1 +++ b/Calendar/Get-RBASummary.ps1 @@ -55,6 +55,22 @@ function ValidateMailbox { Write-Host ; } +# Validate that there are not delegate rules that will block RBA functionality +function ValidateInboxRules { + Write-Host "Checking for Delegate Rules that will block RBA functionality..." + Write-Host -NoNewline "Running : "; Write-Host -ForegroundColor Cyan "Get-InboxRule -mailbox $Identity -IncludeHidden" + $rules = Get-InboxRule -mailbox $Identity -IncludeHidden + # Note as far as I can tell "Delegate Rule " is not localized. + if ($rules.Name -like "Delegate Rule*") { + Write-Host -ForegroundColor Red "Error: There is a user style Delegate Rule setup on this resource mailbox. This will block RBA functionality. Please remove the rule via Remove-InboxRule cmdlet and re-run this script." + Write-Host -NoNewline "Rule to look into: " + Write-Host -ForegroundColor Red "$($rules.Name -like "Delegate Rule*")" + Write-Host -ForegroundColor Red "Exiting script." + exit; + } + Write-Host -ForegroundColor Green "Delegate Rules check passes." +} + # Retrieve the CalendarProcessing information function GetCalendarProcessing { Write-Host -NoNewline "Running : "; Write-Host -ForegroundColor Cyan "Get-CalendarProcessing -Identity $Identity" @@ -476,6 +492,7 @@ function Write-DashLineBoxColor { # Call the Functions in this order: ValidateMailbox +ValidateInboxRules GetCalendarProcessing EvaluateCalProcessing ProcessingLogic diff --git a/docs/Calendar/Get-RBASummary.md b/docs/Calendar/Get-RBASummary.md index 7da1d3c6d5..817a29ea6a 100644 --- a/docs/Calendar/Get-RBASummary.md +++ b/docs/Calendar/Get-RBASummary.md @@ -5,7 +5,7 @@ Download the latest release: [Get-RBASummary.ps1](https://github.com/microsoft/C This script runs the Get-CalendarProcessing cmdlet and returns the output with more details in clear English, highlighting the key settings that affect RBA and some of the common errors in configuration. -The script will validate the mailbox is the correct type for RBA to interact with via the Get-Mailbox cmdlet. +The script will also validate the mailbox is the correct type for RBA to interact with (via the Get-Mailbox cmdlet) as well as check for any Delegate rules that would interfere with RBA functionality (via the Get-InboxRules cmdlet). Syntax: