agentName = "Protocol Filter Agent"; $agent = get-transportagent -Identity:$agentName -TransportService:FrontEnd; if ($agent) ...