An Engineers Notebook

Add Inbox Rule for All Mailboxes

get-MailboxDatabase
Get-MailboxDatabase -identity “Mailbox Database 0413960841” | Add-ADPermission -user adminaccount -AccessRights GenericAll
$Mailboxes = Get-Mailbox
$mailboxes
| % { New-InboxRule -Name AVG_JUNK -Mailbox $_.alias
-SubjectContainsWords "[AVG SERVER DETECTED AS SPAM]" -MoveToFolder
"$($_.alias):Junk E-Mail" }

Leave a Reply

Your email address will not be published.