agentName = "TenantAttributionAndInboundConnectorAgent"; $agentFactory = "Microsoft.Exchange.Hygiene.TenantAttribution.T ...

$agentName = "TenantAttributionAndInboundConnectorAgent";                    $agentFactory = "Microsoft.Exchange.Hygiene.TenantAttribution.TenantInboundConnectorAgentFactory";                    $agentAssembly = ($RoleInstallPath + "TransportRoles\agents\Hygiene\Microsoft.Exchange.Hygiene.TenantAttribution.TenantInboundConnectorAgent.dll");                    $agent = get-transportagent -Identity:$agentName -TransportService:FrontEnd;                    if ($agent) {                        uninstall-transportagent -Identity:$agentName -TransportService:FrontEnd;                    };                    install-TransportAgent -Name:$agentName -TransportAgentFactory:$agentFactory -AssemblyPath:$agentAssembly -TransportService:FrontEnd;                    if ($agent.enabled -or ! $agent) { enable-transportagent -Identity:$agentName  -TransportService:FrontEnd};                    set-TransportAgent -priority:2 -Identity:$agentName -TransportService:FrontEnd;