Problem Description: 

Unable to get Transport Agent Status on HUB Transport Server 2007 & 2010 and prompted to run ReinstallDefaultTransportAgents.ps1 and getting below error  :-

“No valid agents.config file was found in 'C:\Program Files\Microsoft\Exchange Server\TransportRoles\Shared\agents.config'.  The default configuration

 for transport agents can be recovered by running 'scripts\ReinstallDefaultTransportAgents.ps1'.”

 

 Cause:-

 There was no proper permission in place due to this EMS was unable to open agents.config file hence getting the error.

 This error is very confusing because it is asking to run ReinstallDefaultTransportAgents.ps1 while this is just a basic permission issue.

 

 Solution:

 I browsed till shared folder of (C:\Program Files\Microsoft\Exchange Server\TransportRoles\Shared) and clicked on Continue of permission prompt, this solved the problem and now the  issue is resolved and transport agents are showing correctly.