exchange – get mailbox rules

$UserInboxRule = ForEach ($i in (Get-Mailbox -ResultSize Unlimited)) {
Get-InboxRule -Mailbox $i.DistinguishedName | Where-Object { $_.ForwardTo } | fl MailboxOwnerID,Name,ForwardTo,Description
}
$UserInboxRule | Out-File C:\TEMP\User_inbox_Forwarding_rule.txt -Encoding UTF8

Leave a Reply

Your email address will not be published. Required fields are marked *