Archive

Archive for the ‘Powershell’ Category

Transport Rule Journal Selective Domain

March 18, 2009 1 comment

If you want to journal a selective domain using a custom transport rule, this example shows how to use a custom transport rule to copy all emails from yahoo.com to a journal mailbox.

Open Exchange Shell and enter the following:

$Condition = Get-TransportRulePredicate FromAddressContains
$Condition.words = @(“yahoo.com”)
$Action = Get-TransportRuleAction Copyto
$Action.Addresses = @(get-mailbox “journal”)
New-TransportRule -Name “copy messages to journal mailbox” -Conditions @($Condition) -Actions @($Action)

This rule sends a copy to ie. CC’s the message to a journal mailbox. You can also opt to BCC by changing third line to:

$Action = Get-TransportRuleAction BlindCopyto

References:

How to Create a New Transport Rule
http://technet.microsoft.com/en-us/library/bb123927(EXCHG.80).aspx

Transport Rule Actions
http://technet.microsoft.com/en-us/library/aa998315(EXCHG.80).aspx

Transport Rule Predicates
http://technet.microsoft.com/en-us/library/aa998315(EXCHG.80).aspx

Advertisements