How to install this transport agent using install-transport-agent ? RRS feed

  • Question

  • Hello,

    still trying to find a way to install my transport agent, I found another one but I don't find the command line to install it.  The first lines are :

    namespace CustomNDR { public sealed class CustomNDRAgentFactory : RoutingAgentFactory { public override RoutingAgent CreateAgent(SmtpServer server) { return new CustomNDR(); } } public class CustomNDR : RoutingAgent { // Place this text in the subject to test the agent public const string TestToken = "[TEST]"; public const string NdrSubject = "Rejected Message - Original Attached"; public const string OutputPath = @"C:\Users\Administrator\Desktop\CustomNDR\output\"; public const string PickupPath = @"C:\Program Files\Microsoft\Exchange Server\TransportRoles\Pickup\"; public CustomNDR() { LogMessage("CustomNDR{}", "Enter"); this.OnRoutedMessage += new RoutedMessageEventHandler(CustomNDR_OnRoutedMessage); this.OnSubmittedMessage += new SubmittedMessageEventHandler(CustomNDR_OnSubmittedMessage); this.OnResolvedMessage += new ResolvedMessageEventHandler(CustomNDR_OnResolvedMessage); LogMessage("CustomNDR()", "Leave"); }

    Microsoft recommends to use the following cmdlet to install a transport agent but I don't find the good command associated with the previous
    code: Install-TransportAgent -Name "MyCustomAgent" -TransportAgentFactory "MyAgents.MyAgentFactory" -AssemblyPath "C:\myagents\MyAgent.dll"

    Thanks for your help

    Tuesday, June 12, 2012 8:49 AM

All replies

  • Your question is not that clear...

    To create a Transport Agent you would create a class library (make sure you target .net 3.5 on Exchange 2010).

    Then you would use the Exchange Management Shell and Install-TransportAgent and Enable-TransportAgent on the HubServer your trying to install the Agent on to install this eg

    If your having problems with this you need to specific about what the problems or error you are getting ?


    Wednesday, June 13, 2012 6:52 AM