Mailbox Rules
Check:
Install-Module -Name ExchangeOnlineManagement -Force -AllowClobber
Connect-ExchangeOnline -UserPrincipalName bdfir@test.com -ShowProgress $true
get-inboxrule -Mailbox mailbox@test.com
Get-ExoMailbox -ResultSize Unlimited | Select-Object -ExpandProperty UserPrincipalName | Foreach-Object {Get-InboxRule -Mailbox $_ | Select-Object -Property MailboxOwnerID,Name,Enabled,From,Description,RedirectTo,ForwardTo} | Export-csv MailboxRules.csv
Delete:
Install-Module -Name ExchangeOnlineManagement -Force -AllowClobber
Connect-ExchangeOnline -UserPrincipalName "<your O365 admin email address>"
Get-InboxRule -Mailbox "<user email address>"
Remove-InboxRule -Mailbox "<user email address>" -Identity "<rule name>"
Get-InboxRule -Mailbox "<user email address>"
Last updated