vmdude
asked on
Exchange Transport Rule that puts everything tagged with Junk into the junk folder
We have a 3rd party tool that marks susspected spam as *junk* I am trying to create a new transport rule that puts everything with *junk* in the subject into the junk folder.
I have created the following script but its not working.
Please see the attachment for the error I am receiving.
$condition = Get-TransportRulePredicate SubjectContains
$condition.Words = ,"*junk*"
$action = Get-TransportRuleAction SetScl
$action.SclValue = 9
New-TransportRule -Name "Set SCL from *junk*" -Conditions @($condition) -Action @($action) -Enabled: $true
Thanks!
Junk.PNG
I have created the following script but its not working.
Please see the attachment for the error I am receiving.
$condition = Get-TransportRulePredicate
$condition.Words = ,"*junk*"
$action = Get-TransportRuleAction SetScl
$action.SclValue = 9
New-TransportRule -Name "Set SCL from *junk*" -Conditions @($condition) -Action @($action) -Enabled: $true
Thanks!
Junk.PNG
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Whenever you run anything through GUI in Emc at the end it will show you what command was run in the back ground for you to have a look into it. You can use that always for future reference or playing around with it :)
- Rancy
- Rancy
ASKER
Fixed problem myself and updated the thread with reasoning
New-TransportRule
http://technet.microsoft.com/en-us/library/bb125138.aspx
- Rancy