Check Mailbox Forwarding Rules with PowerShell – Fast & Secure Guide

For administrators managing an Exchange environment, ensuring email flows securely and as intended is paramount. A common point of failure or misconfiguration lies in mailbox forwarding rules, which can be set by users or applications and sometimes operate outside of an IT department's awareness. Using PowerShell to check forwarding rules on mailbox provides a powerful, scriptable, and immediate way to audit these settings across your entire infrastructure.

Understanding Mailbox Forwarding in Exchange

Before diving into the cmdlets, it is essential to distinguish between the different types of forwarding in Exchange. AutoForward is a legacy feature typically set by MAPI applications like Outlook, where a rule is created to silently redirect a copy of incoming messages to another address without the sender's knowledge. In contrast, Inbox Rules configured through the Outlook client or OWA can move, delete, or forward messages, and these rules execute under the context of the authenticated user during client-side processing. Delegate access, another common feature, grants permissions to another user to manage mail on behalf of the owner, which is distinct from simple message redirection.

Retrieving Forwarding Settings with Get-Mailbox

The primary property for identifying high-level forwarding is the DeliverToMailboxAndForward setting. When this boolean is set to $true, it indicates that the mailbox is configured to deliver mail to the designated forwarding address in addition to the primary recipient. You can quickly audit this setting across all mailboxes using a simple query in the Exchange Management Shell.

PowerShell isn't scary—these everyday commands prove it
PowerShell isn't scary—these everyday commands prove it

Basic Audit Command

Running the following command retrieves all mailboxes where the delivery setting is enabled for forwarding, providing a snapshot of potential redirection points in your environment.

Command
Get-Mailbox -ResultSize Unlimited | Where-Object { $_.DeliverToMailboxAndForward -eq $true } | Select-Object DisplayName, Alias, DeliverToMailboxAndForward, ForwardingAddress

Inspecting Specific Mailbox Rules with Get-InboxRule

While the mailbox-level property is useful, granular control often resides within Outlook Inbox Rules. These rules can perform complex logic, such as forwarding only emails from specific senders or with certain keywords. To inspect these, you must examine the rules associated with a specific user's mailbox.

Targeted Rule Inspection

The following command filters the rules for a specific user, identifying any that trigger a forward action. This is crucial for discovering shadow IT configurations or rules created by consultants that may no longer be documented.

an email box with the words check your mail written on it and some stickers
an email box with the words check your mail written on it and some stickers

Command
Get-InboxRule -Mailbox "username" | Where-Object { $null -ne $向前 }

Exporting Results for Compliance and Reporting

In a regulated environment, maintaining an audit trail of mailbox configurations is a compliance requirement. Text output is insufficient for archival purposes; structured formats like CSV or JSON are necessary for integration with governance tools. The commands below demonstrate how to pipe the results of your investigation directly into a file for later review.

Generating a CSV Report

This command generates a detailed CSV file containing the display name, primary SMTP address, and forwarding status of every mailbox, providing a permanent record for your governance documentation.

Command
Get-Mailbox -ResultSize Unlimited | Select-Object DisplayName, PrimarySmtpAddress, DeliverToMailboxAndForward, ForwardingAddress | Export-Csv -Path "C:\Reports\ForwardingAudit.csv" -NoTypeInformation

Troubleshooting Common Pitfalls

When executing these cmdlets, you might encounter performance issues or timeouts in large environments. The -ResultSize Unlimited parameter is critical to prevent paging issues, but in massive deployments, you may need to paginate the query using loops. Additionally, ensure your account running the script holds the necessary RBAC roles, specifically the View-Only Recipient role, to avoid access denied errors.

How to Prevent Mail Theft: 15 Proven Tips
How to Prevent Mail Theft: 15 Proven Tips

Automating Discovery with Scriptblocks

For ongoing monitoring, you can wrap the logic into a reusable script that accepts pipeline input. This allows you to target specific users or query all mailboxes dynamically. The script block below provides a robust method to check both the legacy AutoForward property and the modern Inbox Rules engine, returning a comprehensive view of potential message redirection.

Script Logic
Get-Mailbox -Identity $User | Select-Object @{N='ForwardingStatus';E={if($_.DeliverToMailboxAndForward){"Enabled" }else{"Disabled"}}}, @(Get-InboxRule -Mailbox $User | Where-Object {$_.ForwardTo -ne $null} | ForEach-Object { $_.Name }) -Join ', '

I ran one PowerShell command and reclaimed space from a Windows folder nobody explains
I ran one PowerShell command and reclaimed space from a Windows folder nobody explains
How to Get a New Mailbox Key: A Complete Guide
How to Get a New Mailbox Key: A Complete Guide
How to Tame Your Inbox with Apple Mail Rules
How to Tame Your Inbox with Apple Mail Rules
Beautify Your Entryway: Unique Mailbox Designs
Beautify Your Entryway: Unique Mailbox Designs
Mailbox Security – How to Prevent Mail Theft
Mailbox Security – How to Prevent Mail Theft
Turn On Potentially Unwanted Programs (PUP) Protection using GPO, REGEDIT, PowerShell
Turn On Potentially Unwanted Programs (PUP) Protection using GPO, REGEDIT, PowerShell
an info sheet with the words vlookup and indirects in green letters
an info sheet with the words vlookup and indirects in green letters
a pile of pink paper sitting on top of a table
a pile of pink paper sitting on top of a table
a man running towards a mailbox with the word stop thief on it's face
a man running towards a mailbox with the word stop thief on it's face
How to Install a Mailbox: Please, Mr. Postman, Is Mine Up to Code?
How to Install a Mailbox: Please, Mr. Postman, Is Mine Up to Code?
Everyone is using Claude Code. 
Almost nobody is using it properly.

Most developers:
→ Run random commands
→ Ignore CLAUDE .md
→ Treat it like a chat tool

Looks productive.
Wastes massive… | Vamsi Penmetsa
Everyone is using Claude Code. Almost nobody is using it properly. Most developers: → Run random commands → Ignore CLAUDE .md → Treat it like a chat tool Looks productive. Wastes massive… | Vamsi Penmetsa
a computer screen showing the system's settings and instructions for using them on their laptops
a computer screen showing the system's settings and instructions for using them on their laptops
13 Best Mailbox Ideas
13 Best Mailbox Ideas
Virtual office, virtual address, mail forwarding mailbox rental
Virtual office, virtual address, mail forwarding mailbox rental
a white mailbox with a red stick sticking out of it
a white mailbox with a red stick sticking out of it
the mailbox and box are labeled in two different languages
the mailbox and box are labeled in two different languages
a mailbox that has some papers in it
a mailbox that has some papers in it
How to Set an Out of Office Reply in Outlook 2016 and Prior
How to Set an Out of Office Reply in Outlook 2016 and Prior
mailbox with the words your ultimate guide to install a mailbox
mailbox with the words your ultimate guide to install a mailbox
Is It Illegal to Park in Front of a Mailbox?
Is It Illegal to Park in Front of a Mailbox?
a black mailbox sitting on top of a wooden post
a black mailbox sitting on top of a wooden post
How To Make a Mail Notifier
How To Make a Mail Notifier
25 Brick Mailbox Ideas You Can Copy - PlusMood
25 Brick Mailbox Ideas You Can Copy - PlusMood

Related Articles

What Is A Power Lineman Called Power Lineman Vs Electrical Lineman Powerline Lineman Jobs Near Me Lineman's Cross Mailbox Box Near Me Step 2 Mailbox Post Size How Long Should 4x4 Be For Mailbox Product Manager Lineman Wongnai Salary Lineman Salary Salary Lineman Salary Md