Managing Exchange Mailbox Rules with PowerShell

Automate Exchange Online inbox rules with PowerShell. Common pitfalls and solutions for admins.

Published 2025-06-18 by Josue Valentin

Managing mailbox inbox rules in Exchange Online with PowerShell can save admins time and ensure consistent configurations across users. However, certain quirks and errors frequently cause confusion.

Prerequisites

Connecting to Exchange Online

Install-Module -Name ExchangeOnlineManagement
Connect-ExchangeOnline -UserPrincipalName admin@yourdomain.com

Creating an Inbox Rule

# Forward emails from specific sender to another mailbox
New-InboxRule -Mailbox user@domain.com \\
  -Name "Forward from VIP" \\
  -From "vip@external.com" \\
  -ForwardTo "archive@domain.com"

Common Pitfalls

Viewing Existing Rules

Get-InboxRule -Mailbox user@domain.com | Format-List Name, Priority, Enabled

Removing a Rule

Remove-InboxRule -Mailbox user@domain.com -Identity "Rule Name"

For complex Exchange administration tasks, contact our team for assistance.