How to list all Exchange SMTP Connectors in SBS 2007 programmatically

I am trying to write a monitoring app for MS Exchange, and I want to test the SMTP ports. I am trying to programmatically get a list of all the SMTP Connectors for the local MS Exchange instance so I can test them.

I am using C#, and using PowerShell CMDlets.

Get-SendConnector and Get-ReceiveConnector CMDlets are not returning anything.

My test environment is SBS 2007.

This doesn't return anything, on a server that does have Exchange 2007 installed.

Add-PSSnapin Microsoft.Exchange.Management.PowerShell.Admin

Open in new window

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Kamalasekar ParthasarathyMessaging SupportCommented:

Please post the error message when you are executed the above command. Also let us know the event viewer error messsage.
Use cmd with transport server name :

Get-Sendconnector -Server <Hub server name>
ravib123Author Commented:
sekar_raj32, there is no error message. It doesn't return anything.

kpa2011, using Get-SendConector with -Server yields the following error:
Get-SendConnector : A parameter cannot be found that matches parameter name 'Server'.
Is the HUB server role is configured on the same server? Try running the cmd from the HUB server. If you a single server where all roles are installed and still get-sendconnector cmd not showing any connectors means there is no explicit send connector configured in your setup. Please note that by default, Exchange server would not have any explict send connector. You need to configure send connector to internet any other external Org manually or using edge sync.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.