How to manually install, uninstall or temporarily disable CodeTwo Exchange Rules Transport Agent

Problem:

Software products from the CodeTwo Exchange Rules family process emails via a dedicated Exchange transport agent: CodeTwo Exchange Rules Transport Agent. Normally, the agent is installed automatically together with the program. On rare occasions, the installation of the Transport Agent might fail and you need to install it manually. This article also shows how to manually uninstall, disable or re-enable the agent.

Solution:

Read this before you proceed

  • Before running the commands from the solution below, please ensure that you are logged in as a user who is a direct member of the Organization Management and Domain Admin groups.
  • Be aware that after you apply any of the changes below, a restart of MS Exchange Transport Service is required. To do that, open ems Exchange Management Shell and execute this commandlet:
    Restart-Service MSExchangeTransport

How to manually install CodeTwo Exchange Rules Transport Agent

Open ems Exchange Management Shell and execute the following PowerShell cmdlets:

  • If you use CodeTwo Exchange Rules 2007 3.x:
    Install-TransportAgent -Name "CodeTwoExchangeRules" -TransportAgentFactory "ExchangeRulesAgent.CAgentFactory" -AssemblyPath "C:\Program Files\CodeTwo\CodeTwo Exchange Rules 2007\ExchangeRulesAgent.dll"
    Enable-TransportAgent -Identity "CodeTwoExchangeRules"
  • If you use CodeTwo Exchange Rules 2007 4.x:
    Install-TransportAgent -Name "CodeTwo Exchange Rules" -TransportAgentFactory "Agent.CAgentFactoryRouting" -AssemblyPath "C:\Program Files\CodeTwo\CodeTwo Exchange Rules\CodeTwo.ER.Agent.dll"
    Enable-TransportAgent -Identity "CodeTwo Exchange Rules"
  • If you use CodeTwo Exchange Rules 2010 2.x:
    Install-TransportAgent -Name "CodeTwoExchangeRules" -TransportAgentFactory "ExchangeRulesAgent.CAgentFactory" -AssemblyPath "C:\Program Files\CodeTwo\CodeTwo Exchange Rules 2010\ExchangeRulesAgent.dll"
    Enable-TransportAgent -Identity "CodeTwoExchangeRules"
  • If you use CodeTwo Exchange Rules 2010 3.x:
    Install-TransportAgent -Name "CodeTwo Exchange Rules" -TransportAgentFactory "Agent.CAgentFactoryRouting" -AssemblyPath "C:\Program Files\CodeTwo\CodeTwo Exchange Rules\CodeTwo.ER.Agent.dll"
    Enable-TransportAgent -Identity "CodeTwo Exchange Rules"
  • If you use CodeTwo Exchange Rules 2013 1.x:
    Install-TransportAgent -Name "CodeTwoExchangeRules" -TransportAgentFactory "ExchangeRulesAgent.CAgentFactory" -AssemblyPath "C:\Program Files\CodeTwo\CodeTwo Exchange Rules 2013\ExchangeRulesAgent.dll"
    Enable-TransportAgent -Identity "CodeTwoExchangeRules"
  • If you use CodeTwo Exchange Rules 2013 2.x:
    Install-TransportAgent -Name "CodeTwo Exchange Rules" -TransportAgentFactory "Agent.CAgentFactoryRouting" -AssemblyPath "C:\Program Files\CodeTwo\CodeTwo Exchange Rules\CodeTwo.ER.Agent.dll"
    Enable-TransportAgent -Identity "CodeTwo Exchange Rules"
  • If you use CodeTwo Exchange Rules 2016 1.x:
    Install-TransportAgent -Name "CodeTwo Exchange Rules" -TransportAgentFactory "Agent.CAgentFactoryRouting" -AssemblyPath "C:\Program Files\CodeTwo\CodeTwo Exchange Rules\CodeTwo.ER.Agent.dll"
    Enable-TransportAgent -Identity "CodeTwo Exchange Rules"
  • If you use CodeTwo Exchange Rules Pro 1.x:
    Install-TransportAgent -Name "CodeTwoExchangeRulesPro" -TransportAgentFactory "Agent.CAgentFactoryRouting" -AssemblyPath "C:\Program Files\CodeTwo\CodeTwo Exchange Rules Pro\CodeTwo.ER.Agent.dll"
    Enable-TransportAgent -Identity "CodeTwoExchangeRulesPro"
  • If you use CodeTwo Exchange Rules Pro 2.x:
    Install-TransportAgent -Name "CodeTwo Exchange Rules" -TransportAgentFactory "Agent.CAgentFactoryRouting" -AssemblyPath "C:\Program Files\CodeTwo\CodeTwo Exchange Rules\CodeTwo.ER.Agent.dll"
    Enable-TransportAgent -Identity "CodeTwo Exchange Rules"

How to manually remove CodeTwo Exchange Rules Transport Agent

Open ems Exchange Management Shell and execute the PowerShell cmdlet below (type in the appropriate name of the agent instead of <Transport Agent Name>):

Uninstall-TransportAgent -Identity "<Transport Agent Name>"

How to manually disable CodeTwo Exchange Rules Transport Agent

Open ems Exchange Management Shell and execute the PowerShell cmdlet below (provide the appropriate name of the agent instead of <Transport Agent Name>):

Disable-TransportAgent -Identity "<Transport Agent Name>"

How to manually enable a previously disabled CodeTwo Exchange Rules Transport Agent:

Open ems Exchange Management Shell and execute the PowerShell Cmdlet below (type in the appropriate name of the agent instead of <Transport Agent Name>):

Enable-TransportAgent -Identity "<Transport Agent Name>"

How to check what transport agents are installed and what are their statuses

Open ems Exchange Management Shell and execute the following PowerShell cmdlet:

Get-TransportAgent

See also:

Microsoft Technet articles on the PowerShell cmdlets described above:

Info

Be aware that the above articles apply to MS Exchange Server 2013, butr the usage of cmdlets is almost identical in the previous Exchange versions. To get manuals on the usage of cmdlets that match your Exchange Server version, search MS TechNet.

CodeTwo resources: