As part of your security protocol, you may wish to audit user mailboxes for rules that deliver messages to external recipients. You can use this script to collect that data.
- Fixed following error:
Cannot process argument transformation on parameter 'Mailbox'. Cannot convert value "First Last" to type
"Microsoft.Exchange.Configuration.Tasks.MailboxIdParameter". Error: "Cannot convert hashtable to an object of the
following type: Microsoft.Exchange.Configuration.Tasks.MailboxIdParameter. Hashtable-to-Object conversion is not
supported in restricted language mode or a Data section."
+ CategoryInfo : InvalidData: (:) [Get-InboxRule], ParameterBindin...mationException
+ FullyQualifiedErrorId : ParameterArgumentTransformationError,Get-InboxRule
+ PSComputerName : outlook.office365.com
This script checks user mailboxes for rules that match the following:
- ForwardAsAttachmentTo is an external recipient
- ForwardTo is an external recipient
- RedirectTo is an external recipient
If detected, those rules are saved in an audit log for further review. You can use this script against either Exchange on-premises versions that support Get-InboxRule (Exchange 2010 or later) or Exchange Online. You must have at least Recipient
Management permission for this cmdlet to work.