Get all the Exchange Server's in a Domain

Hello Together

I work as an apprentice for a big company, where i have to find out all the exchange Server of this firm.
Because of this i made a script, which gives me all the servers.
Now i imported these server in another script which should filter out all the exchange servers.
but it didn’t work and now my question…
Is there a better or another way to find out all the exchange servers ?

Thanks for a fast reply.

P.S: Sorry for my bad english :smiley:

hi,

Assuming you have a single domain, there should be a group in Active Directory called “Exchange Servers”. The members of this group contains all the servers for the Exchange Organization. Please note that a member of that group could also be a group (what we call nested-group-member). Using the ActiveDirectory powershell module it is easy to list the member of the group:

(If you don’t have the Remote Server Administration Tools (RSAT) installed, you can run this command to install them:

Get-WindowsFeature -Name RSAT | Add-WindowsFeature -IncludeAllSubFeature

)

PS D:\PowerShell> Get-ADGroup -Identity “Exchange Servers” |Get-ADGroupMember | Format-Table -AutoSize

distinguishedName name objectClass


CN=Exchange1,OU=Exchange servers,OU=Servers,DC=contoso,DC=com Exchange1 computer
CN=Exchange2,OU=Exchange servers,OU=Servers,DC=contoso,DC=com Exchange2 computer
CN=Exchange Install Domain Servers,CN=Microsoft Exchange System Objects,DC=contoso,DC=no Exchange Install Domain Servers group

ObjectClass gives you the object type (computer/group).

Hope this helps.

Cheers

Tore