To view the rules associated with a mailbox use the Get-InboxRule cmdlet. Very useful when you are troubleshooting a remote user who is not getting emails and you suspect the rules could have a hand in it.
PS> Get-InboxRule -Mailbox rakhesh "Facebook"
To disable and enable rules you have the Disable-InboxRule and Enable-InboxRule cmdlets.
PS> Disable-InboxRule -Mailbox rakhesh "Facebook" Confirm Using Outlook Web App or Windows PowerShell to modify your rules will delete any rules that were previously turned off using Outlook. If you want to preserve the rules you turned off using Outlook, select "No" and use Outlook to edit your rules. Are you sure you want to proceed? [Y] Yes [A] Yes to All [N] No [L] No to All [?] Help (default is "Y"): y This Inbox rule isn't supported by this version of Exchange. + CategoryInfo : InvalidOperation: (Facebook:InboxRuleIdParameter) [Disable-InboxRule], InvalidOperationE xception + FullyQualifiedErrorId : 783DD273,Microsoft.Exchange.Management.RecipientTasks.DisableInboxRule PS> # the error is because this is a client only rule and so can't be manipulated from the server PS> # so let's try another rule PS> Disable-InboxRule -Mailbox rakhesh "SCOM Alerts" Confirm Using Outlook Web App or Windows PowerShell to modify your rules will delete any rules that were previously turned off using Outlook. If you want to preserve the rules you turned off using Outlook, select "No" and use Outlook to edit your rules. Are you sure you want to proceed? [Y] Yes [A] Yes to All [N] No [L] No to All [?] Help (default is "Y"): PS> # enabling the previously disabled rule PS> Enable-InboxRule -Mailbox rakhesh "SCOM Alerts"
PS> Disable-InboxRule -Mailbox rakhesh "Facebook"
rules. Are you sure you want to proceed?
This Inbox rule isn't supported by this version of Exchange.
PS> Disable-InboxRule -Mailbox rakhesh "SCOM Alerts"
PS> Enable-InboxRule -Mailbox rakhesh "SCOM Alerts"
PS> Remove-InboxRule -Mailbox rakhesh "Mails from Gmail"
Removing inbox rule "Mails from Gmail" from mailbox "domain.com/path/to/OU/Sasidharan, Rakhesh".
Managing Outlook rules using PowerShell by rakhesh is licensed under a Creative Commons Attribution 4.0 International License.