How to Find Automatic Email Forwarding Rules in Exchange Online
Question details
Administrators need to identify all mailboxes in Exchange Online that have automatic email forwarding configured and export this list for review.

- Product
- Exchange Online
- Device & OS
- not provided
- Scenario
- Auditing or managing mailbox security and compliance within Microsoft 365.
- Observed behavior
- Administrators require a fast, script-based method to retrieve a complete list of forwarding rules and save the output as a CSV file.
Ensure you have the Exchange Administrator role in Microsoft 365 and that the Exchange Online PowerShell module is installed on your computer.
Use Exchange Online PowerShell to Export Forwarding Rules
Execute a targeted PowerShell command to query all mailboxes for forwarding configurations and export the results directly to a CSV file.
PowerShell provides a quick and comprehensive way to audit mailbox settings across your entire organization. This method captures the mailbox name, the forwarding address, and whether copies of the emails are retained in the original inbox.
Open PowerShell on your computer as an administrator and run 'Connect-ExchangeOnline'. Sign in with your Microsoft 365 administrator credentials.
Type the following command and press Enter: Get-Mailbox -ResultSize unlimited | Where-Object {$_.ForwardingSmtpAddress -ne $null} | Select-Object Name, ForwardingAddress, ForwardingSmtpAddress, DeliverToMailboxAndForward | Export-Csv C:\for.csv
Navigate to the designated output folder on your computer (e.g., your C: drive) and open the 'for.csv' file using a spreadsheet application to view the list of configured forwarding rules.
Need a fast, reliable spreadsheet tool to analyze your CSV reports?
While you manage server-side rules in Exchange Online, viewing and auditing those exported CSV files requires a capable spreadsheet editor. WPS Office is a free, lightweight, and powerful alternative to Microsoft Office that easily handles CSV, Excel, and Word documents.

Frequently Asked Questions
Can I view auto-forwarding rules in the Microsoft 365 Admin Center without PowerShell?
Yes, administrators can view forwarding reports in the Exchange Admin Center under Mail flow > Reports, or within the Microsoft Defender portal. However, PowerShell provides the most efficient way to perform bulk exports of this data.
Why does the PowerShell command return a blank file or no results?
If the exported CSV is blank, it either means no mailboxes in your organization currently have auto-forwarding configured, or your admin account lacks the necessary permissions (such as View-Only Recipients) to read the mailbox configurations.
How do I install the Exchange Online PowerShell module if I don't have it?
Open PowerShell as an administrator and run 'Install-Module -Name ExchangeOnlineManagement'. Once the installation completes, you can use the 'Connect-ExchangeOnline' command to authenticate.




