Link to home
Start Free TrialLog in
Avatar of mmcodefive
mmcodefiveFlag for United States of America

asked on

Exchange Rules Report

I have an Exchange 2010 SP2 server. I created a rule called "Spam" using the Exchange PowerShell command new-inboxrule for all my users.

Anyone can delete the rule I created using Outlook.

I want to know how to script running a report that will verify that the "Spam" rule exists in each of my users mailbox.

Thanks for your help
Avatar of suriyaehnop
suriyaehnop
Flag of Malaysia image

Hi,

I believe that you are running on Exchange 2010 SP2 NOT Exchange 2007 SP2 since "New-InboxRule" is cmdlet availble on Exchange 2010 SP2

Managing Inbox Rules in Exchange Server 2010

Refer to link http://www.msexchange.org/articles_tutorials/exchange-server-2010/management-administration/managing-inbox-rules-exchange-server-2010.html
New-InboxRule works on Exchange 2010 Read: link

Run a simple cmdlet

Get-Mailbox | Get-InboxRule | where {$_.Name -eq "*Spam*"}

You'll get the entire list of mailboxes that have the rule configured for it.

Regards,
Exchange_Geek
Avatar of mmcodefive

ASKER

I ran that and the only output I am getting is errors when the rule is not found.

The operation couldn't be performed because 'domain.local/Users/test\' couldn't be found.
    + CategoryInfo          : NotSpecified: (:) [Get-InboxRule], ManagementObjectNotFoundException
    + FullyQualifiedErrorId : 7A5308EF,Microsoft.Exchange.Management.RecipientTasks.GetInboxRule

I would like it to output a list of users that have the rule.
Let me try this on my lab tomorrow.

Regards,
Exchange_Geek
Exchange_Geek, any update? Thanks for your help
ASKER CERTIFIED SOLUTION
Avatar of mmcodefive
mmcodefive
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I solved my own problem