How to check mailbox rules in O365

How to see Rules applied to users accounts.

You will need to be familiar enough with Powershell to be able to copy text and create a script - it’s easy to do.

  1. Copy the following script:

get-mailbox -resultsize unlimited | foreach { Write-Verbose "Checking $($.alias)..." -Verbose $inboxrule = get-inboxrule -Mailbox $.alias
if ($inboxrule) { foreach($rule in $inboxrule){ [PSCustomObject]@{ Mailbox = $_.alias Rulename = $rule.name Rulepriority = $rule.priority Ruledescription = $rule.description } } } } | Export-csv "$env:userprofile\desktop\export.csv" -NoTypeInformation

It will then create a .CSV file with all the mailboxes within your tenants and all the rules applied to them. Very useful to run for compromised accounts.

Previous
Previous

How to check Shared mailbox’s Access Rights via Powershell

Next
Next

How to check User and Shared Mailbox Forwards in O365