Trend WFBS Mail Security Breaks Exchange Transport On Uninstall

I have a customer for whom we just uninstalled Trend WFBS with the messaging security component. I sent and received test emails just fine, all appeared well. Until a reboot, when these events popped up in the event log:

MSExchangeTransport #16023:
Microsoft Exchange couldn’t start transport agents. The Microsoft Exchange Transport service will be stopped. Exception details: Failed to create type ‘TrendMicro.SMEX.hookE12TransportAgent.hookE12SmtpReceiveAgentFactory’ from assembly ‘C:\Program Files\Trend Micro\Messaging Security Agent\hookE12TransportAgent.dll’ due to error ‘Invalid agent assembly path.’. : Microsoft.Exchange.Data.ExchangeConfigurationException: Failed to create type ‘TrendMicro.SMEX.hookE12TransportAgent.hookE12SmtpReceiveAgentFactory’ from assembly ‘C:\Program Files\Trend Micro\Messaging Security Agent\hookE12TransportAgent.dll’ due to error ‘Invalid agent assembly path.’. —> System.ArgumentException: Invalid agent assembly path.

MSExchange Extensibility #1052:
The creation of an agent factory for the agent ‘ScanMail SMTP Receive Agent’ failed with error ‘Failed to create type ‘TrendMicro.SMEX.hookE12TransportAgent.hookE12SmtpReceiveAgentFactory’ from assembly ‘C:\Program Files\Trend Micro\Messaging Security Agent\hookE12TransportAgent.dll’ due to error ‘Invalid agent assembly path.’.’. Verify that the corresponding transport agent assembly and dependencies with the correct version are installed.

The cmdlet to check for transport agents isĀ Get-TransportAgent – let’s see what it says:

[PS] C:\Windows\system32>Get-TransportAgent
Identity Enabled Priority
-------- ------- --------
ScanMail SMTP Receive Agent True 1
ScanMail Routing Agent True 2
Transport Rule Agent True 3
Journaling Agent True 4
AD RMS Prelicensing Agent False 5
Connection Filtering Agent True 6
Content Filter Agent True 7
Sender Id Agent True 8
Sender Filter Agent True 9
Recipient Filter Agent True 10
Protocol Analysis Agent True 11

And the ScanMail components?

[PS] C:\Windows\system32>Get-TransportAgent ScanMail* | fl
Identity : ScanMail SMTP Receive Agent
Enabled : True
Priority : 1
TransportAgentFactory : TrendMicro.SMEX.hookE12TransportAgent.hookE12SmtpReceiveAgentFactory
AssemblyPath : C:\Program Files\Trend Micro\Messaging Security Agent\hookE12TransportAgent.dll
Identity : ScanMail Routing Agent
Enabled : True
Priority : 2
TransportAgentFactory : TrendMicro.SMEX.hookE12TransportAgent.hookE12RoutingAgentFactory
AssemblyPath : C:\Program Files\Trend Micro\Messaging Security Agent\hookE12TransportAgent.dll

Let’s uninstall those bad boys and see if that fixes it:

[PS] C:\Windows\system32>Get-TransportAgent ScanMail* | Uninstall-TransportAgent

A service restart confirms – resolved without further errors!