Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

how to programatoically get exchange server name

0 views
Skip to first unread message

Ashish

unread,
Jun 3, 2009, 7:05:50 AM6/3/09
to
If there are multiple exchange servers(single domain) then how to get its
exchange server name for each machine?
Suppose machine1 has exchange server1, machine2 has exchange server2 etc
then how to get exchange server1 on machine1.

GetComputerName returns exchange server name. But in cluster environment
exchange server name is different from machine name


a@tleederbyshired.0.tc.0.m Lee Derbyshire [MVP]

unread,
Jun 3, 2009, 11:20:47 AM6/3/09
to
"Ashish" <akohl...@hotmail.com> wrote in message
news:%2354kutD...@TK2MSFTNGP04.phx.gbl...

You could try getting it from the Configuration/Services/Microsoft Exchange
section of AD.

Lee.

--
______________________________________

Outlook Web Access For PDA , OWA For WAP
www.leederbyshire.com
lee a.t leederbyshire d.o.t c.o.m
______________________________________


Ashish

unread,
Jun 4, 2009, 3:16:33 AM6/4/09
to
is there any example available for this or how to access
Configuration/Services
"Lee Derbyshire [MVP]" <email a@t leederbyshire d.0.t c.0.m> wrote in
message news:uuicg7F5...@TK2MSFTNGP05.phx.gbl...

a@tleederbyshired.0.tc.0.m Lee Derbyshire [MVP]

unread,
Jun 4, 2009, 8:35:00 AM6/4/09
to
Try putting this (but containing your own domain name) in a .vbs file, and
double-clicking it:


Const ADS_SCOPE_SUBTREE = 2
Set objConnection = CreateObject("ADODB.Connection")
Set objCommand = CreateObject("ADODB.Command")
objConnection.Provider = "ADsDSOObject"
objConnection.Open "Active Directory Provider"
Set objCommand.ActiveConnection = objConnection
objCommand.CommandText = "SELECT Name FROM 'LDAP://CN=Administrative
Groups,CN=First Organization,CN=Microsoft
Exchange,CN=Services,CN=Configuration,DC=yourdomain,DC=com' WHERE
objectClass='msExchExchangeServer'"
objCommand.Properties("Page Size") = 1000
objCommand.Properties("Searchscope") = ADS_SCOPE_SUBTREE
Set objRecordSet = objCommand.Execute
objRecordSet.MoveFirst
Do Until objRecordSet.EOF
WScript.Echo"Server Name: " & objRecordSet.Fields("Name").Value
objRecordSet.MoveNext
Loop

"Ashish" <akohl...@hotmail.com> wrote in message

news:OskkSSO5...@TK2MSFTNGP03.phx.gbl...

kelly

unread,
Jun 5, 2009, 10:53:32 AM6/5/09
to Ashish
try get-exchangeserver in powershell after you have installed the
exchange tools. That will give you all the exchanges servers in the
cluster.

Kelly

0 new messages