none
Can you have a Powershell script trigger from Transport Rule being broken RRS feed

  • Question

  • Hi,

    I have a question hopefully some experts might be able to answer.  I am running Exchange 2010 SP1 and am trying to set some transport rules in the Hub Transport, I was wondering whether it was possible to have a Powershell script run off the back of a transport rule being triggered?

    The main reason for this is I am wanting to send a new email out when the rule is triggered, whilst also then forwarding/moving the original triggering email into a holding quarantine mailbox.  I have looked through the EMS commands available for New-TransportRule and can't see any actions to send a new email out, also there doesn't seem to be anything for moving the triggering email into a quarantine folder (EMS New-TransportRule commands).  So I was thinking that if a PowerShell script could be an action then I could use that to do the above?

    Any help would be be really appreciated!

    Cheers,

    Tom

    Wednesday, January 21, 2015 4:28 PM

All replies

  • >> was wondering whether it was possible to have a Powershell script run off the back of a transport rule being triggered?

    No it isn't you can build your own Transport Agent https://msdn.microsoft.com/en-us/library/office/dd877035(v=exchg.150).aspx to do what your Transport Rule is doing and you can then do whatever you like in within the constraints of the Transport Pipeline.

    >>The main reason for this is I am wanting to send a new email out when the rule is triggered, whilst also then forwarding/moving the original triggering email into a holding quarantine mailbox.

    On 2010 you have the following Action in a Transport Rule https://technet.microsoft.com/en-us/library/aa998315(v=exchg.141).aspx Moderation should really cover what you doing this provides both the quarantine and also approval/release mechanism. Otherwise look at the redirect the message to addresses action and then write a script to mointer whatever mailbox you redirect to otherwise a Transport Agent can do that.

    Cheers
    Glen

    Thursday, January 22, 2015 3:09 AM