Microsoft 365

Microsoft 365: List all Outlook Inbox Rules created by the User

PowerShell is the tool you need to list all inbox rules of all users in your environment. In this blog post I will show how to connect to Exchange Online to afterwards retrieve all outlook inbox rules created by the user. Let’s dive in.

Connect to Microsoft 365 / Exchange Online

First we need to connect to our tenant. Run the commands below to open a PowerShell session to your Microsoft cloud.

 Install-Module -Name ExchangeOnlineManagement -Force -AllowClobber 
Connect-ExchangeOnline -UserPrincipalName user@domain.com -ShowProgress $true 

Fine. Let’s move on.

List Inbox Rules from all users

We are now ready to get a list of all rules created by the user. Run the command below to get them all.

 Get-ExoMailbox -ResultSize Unlimited | 
Select-Object -ExpandProperty UserPrincipalName | 
Foreach-Object {Get-InboxRule -Mailbox $_ | 
Select-Object -Property MailboxOwnerID,Name,Enabled,From,Description,RedirectTo,ForwardTo}

Here they are (Rules in German):

Anmerkung 2020-05-25 162309

See you next time with PowerShell!

6 replies »

  1. Hi Patrick,

    Many Thanks for your Script.

    It was very helpful for me.

    How can I select or read the “ForwardingSMTPAddress” or the external destination email address of the user inbox rules.

    Thanky and best wishes

    Patan

    Liked by 1 person

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.