I am creating a script that will catalog all of the inbox rules for each user in our organization so we can review them to make sure there are not any nefarious ones setup by outside sources. The command I have set so far is:
Get-InboxRule -Mailbox user1@trademarkproperty.com | Export-Csv -Path C:\Exch_Rules\User1_Rules.csv
When I run this command in powershell I see in the console that some of the rules it pulls have warnings due to errors in them. I would like to be able to have these warnings captured into a separate file. Is there a cmdlet I can deploy to make this happen?