Friday, January 16, 2015

What is Exchange transport agent and how to change its settings with PowerShell?

Microsoft Exchange server allows to access the message transport pipeline with transport agents. They are small programs that have a direct access to messages processed by the transport service of Exchange.

This is especially useful when you need to e.g. scan contents of incoming emails for spam, detect viruses or trigger any other action with the information found in the message.

MSH Software Exchange Autoresponder also works utilizing the transport agent. When the message contains a specific keyword or is sent from, or to the specific email address it performs an action and sends a reply.

To check the list of currently installed agents on your Exchange server run the following command in the PowerShell console:


The resulting list shows three columns:
  • Identity - name of the transport agent,
  • Enabled - the state of the agent. True means that the agent is turned on,
  • Priority - the order in which the message is checked by transport agents. When the agent is set to priority 1 it means it will process the message first.

PowerShell (PS) console also allows to change various settings od these agents, most commonly to disable or enable them, or change their priority.

To disable specific agent, e.g. MSH Exchange Autoresponder you need to run the following command in PS:

Disable-TransportAgent -Identity "MSH Exchange Autoresponder"

Enabling the agent is very similar:

Enable-TransportAgent -Identity "MSH Exchange Autoresponder"

To change its priority run the command:

Set-TransportAgent -identity "MSH Exchange Autoresponder" -priority 1

Note that all other agents will automatically change their priority to match the new situation. In the above case, the priority of the rest of available agents will be changed up by one position.

Instead of the PowerShell console you can use the graphical interface of MSH Exchange Autoresponder. It's much easier and allows performing described actions with just a couple of clicks:

Exchange transport agents' settings window in MSH Exchange Autoresponder
Use graphical interface to manage Exchange Autoresponder transport agent.

Click here if you want to learn more about MSH Exchange Autoresponder.