Adds a disclaimer to all message sent from the mailbox kenmyer@fabrikam.com. This script/command requires Microsoft Exchange Server 2007.
$ConditionArray = Get-TransportRulePredicate $Condition = @($ConditionArray[0]) $Condition[0].addresses = get-mailbox kenmyer@fabrikam.com $ActionArray = Get-TransportRuleAction $Action = @($ActionArray[14]) $Action[0].Text = "Test disclaim message for one liner" New-TransportRule "newrule" -Conditions $condition -Actions $action
$ConditionArray = Get-TransportRulePredicate $Condition = @($ConditionArray[0]) $Condition[0].addresses = get-mailbox kenmyer@fabrikam.com $ActionArray = Get-TransportRuleAction $Action = @($ActionArray[14]) $Action[0].Text = "Test disclaim message for one liner" New-TransportRule "newrule" -Conditions $condition -Actions $action