[Exchange 2007/2010] How to run "get-transportagent" remotely for multiple 100 servers?

Posted on 2013-12-03
Medium Priority
Last Modified: 2014-05-29
How to run "get-transportagent" remotely for multiple 100 servers?
Looks easy but totally not.
I need to check get-transportagent result for over 100 servers from a management server.
Question by:kimakabane
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
LVL 33

Expert Comment

ID: 39694734
by default when you run this command it displays a summary list of all transport agents installed on all Exchange servers in your organization.

Author Comment

ID: 39694741

Thanks but they show different result as hub transport servers in my organization have different agent setup. I need to run it individually on 100 servers.
LVL 33

Expert Comment

ID: 39694747
so your issue in the reporting, have you tried format list
get-transportagent | FL

THis will will return a list and in structured format, am I following correctly ?!
Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.


Author Comment

ID: 39694756
No, you're not following my question.

1. I have 100 Hub transport servers
2. I need to see "get-transportagent" result on each individual servers because each server shows different result.

"get-transportagent" doesn't have "-server" option. I tried invoke-command but not worked for exchangeshell.

I don't want to run the command by logging on via RDP to 100 servers.
LVL 33

Expert Comment

ID: 39694761
that is what I am telling you, when you run the command it will return all the agents installed on all the servers in your organization, you don't need to use -server switch
LVL 33

Expert Comment

ID: 39694765
Sorry it returns the config on all servers for Exchange 2013, I mixed stuff, can you verify that it returns all the config from all servers in the org in 2010

Accepted Solution

kimakabane earned 0 total points
ID: 39694784

for example please see below web site:

> Anti malware protection registers an agent and can be easily seen using Get-TransportAgent

>Get-TransportAgent cmdlet is a per Transport server configuration setting. This example has 3 of the agents disabled. So this will only affect the Hub this is configured on:

If AntiMalware (or any) agent is installed on the particular hub server, the get-transportagent command on that hub server will return specific Identity.

In my case, I need to run the command to checkwhat agents are running on which hub servers.

LVL 33

Expert Comment

ID: 39694791
Hi Kim,
I don't have Exchange 2010 in my lab, but as it looks it does return the config per server.

In this case you will need to make a script to loop through your servers, connect remotely and run the command.

create a csv with a header serverfqdn server names and then try:
Import-CSV CreateRecipients.csv | ForEach {
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri http://$_.serverfqdn/PowerShell/ -Authentication Kerberos
Import-PSSession $Session
get-transportaget | export-csv $_.serverfqdn.csv
This will loop through the CSV file, read the server, connect remotely run the powershell and export the output to csv file with the server name, I created this script on the fly so you need to test it, report if any errors (which I believe you will receive).

Author Closing Comment

ID: 40097756
The command provided was reasonable one.

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
Unified and professional email signatures help maintain a consistent company brand image to the outside world. This article shows how to create an email signature in Exchange Server 2010 using a transport rule and how to overcome native limitations …
In this video we show how to create a Contact in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Recipients >> Contact ta…
In this video we show how to create an email address policy in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.:  First we need to log into the Exchange Admin Center. Navigate to the Mail Flow…
Suggested Courses

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question