Quantcast
Channel: PowerShell
Viewing all articles
Browse latest Browse all 15370

PowerShell Command to send warnings to a file

$
0
0

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?


Viewing all articles
Browse latest Browse all 15370


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>