Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I would like to use powershell to find all available mail servers in a given network segment, or domain wide. Is this possible and how could you do it?

share|improve this question
add comment

3 Answers 3

up vote 4 down vote accepted

Do you mean something like this?

Get-ExchangeServer -domain [DOMAIN NAME]

share|improve this answer
add comment

get-mailboxserver from the Exchange powershell is supposed to be able to do this.

Name                      ManagedFolderAssi ClusteredStorageT MapiEncryptionReq
                          stantSchedule     ype               uired
----                      ----------------- ----------------- -----------------
EXCHMAILBOX3                                Disabled          False
EXCHMAILBOX4                                Disabled          False
EXCHMAILBOX1                                Disabled          False
EXCHMAILBOX2                                Disabled          False

Is there some part of your environment that makes this not work for you?

share|improve this answer
I'd do Get-Exchangeserver - that should do all roles, not just mailbox servers. –  Ben Pilbrow Aug 27 '10 at 20:45
add comment

If they're exchange, you can probably use Powershell to query AD for that, sure. If they're not exchange, it depends on how you define "mailserver", and regardless, that will be much more difficult.

  • Good answer below for Exchange, exactly what I figured there would be.
share|improve this answer
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.