| Author |
Message |
Bharat Suneja
Guest
|
Posted:
Tue Oct 11, 2005 4:58 pm Post subject:
How to discover Exchange Server is an EVS (clustered)? |
|
|
Hi All,
When you discover all Exchange servers in an Org (through the Configuration
partition), how can you discover which servers are actually Exchange Virtual
Servers (clustered)? Method should work on both platforms (Windows/Exchange
2000/2003).
--
Bharat Suneja
MCSE, MCT
--------------------------------
|
|
| Back to top |
|
 |
Scott
Guest
|
Posted:
Wed Oct 12, 2005 4:58 pm Post subject:
Re: How to discover Exchange Server is an EVS (clustered)? |
|
|
Determining If the Specified Server Is a Clustered Server
--------------------------------------------------------------------------------
The following example determines whether the specified server is a clustered
server.
Visual Basic
'//////////////////////////////////////////////////////////////////////
' Function: isClusteredServer()
' Purpose: Determines if the specified server is a clustered server.
'
' Input: szDomainName: Domain of the Exchange organization
' szOrganizationName: Name of Exchange Organization
' szAdministrativeGroupName: Name of Administrative Group
' szServerName: Name of server to enumerate
' szUserName: Admin Username
' szUserPwd: Admin pwd
' szDirectoryServer: Name of the Directory Server
'
' Output: isFrontEndServer: Contains Error code (if any)
' isClustered: Answer to the question
'
' Note: In order for this example to function correctly, it may be
necessary to include
' references to the following libraries: Active DS Type Library, Microsoft
CDO for
' Exchange Management Library, Microsoft Cluster Service Automation Classes,
' Microsoft CDO for Windows 2000 Library.
'//////////////////////////////////////////////////////////////////////
Public Function isClusteredServer(ByVal szDomainName As String, _
ByVal szOrganizationName As String, _
ByVal szAdministrativeGroupName As String,
_
ByVal szServerName As String, _
ByVal szUserName As String, _
ByVal szUserPwd As String, _
ByRef isClustered As Boolean, _
ByVal szDirectoryServer) As Integer
Dim objLdap As IADsOpenDSObject
Dim objContainer As IADs
Dim szConnString As String
Dim szaDomTokens() As String
Dim szDomainDN As String
On Error GoTo errhandler
' Put the domain name into an ldap string.
szaDomTokens = Split(szDomainName, ".", -1, 1)
szDomainDN = Join(szaDomTokens, ",dc=")
szDomainDN = "dc=" & szDomainDN
' Build up the ldap connection string.
szConnString = "LDAP://" + szDirectoryServer + "/cn=" + szServerName + _
",cn=servers,cn=" + szAdministrativeGroupName +
",cn=Administrative Groups,cn=" _
+ szOrganizationName + ",cn=Microsoft
Exchange,cn=services,cn=configuration," + _
szDomainDN
' Open up the directory with passed credentials.
Set objLdap = GetObject("LDAP:")
' Get a container object from the connection string.
Set objContainer = objLdap.OpenDSObject(szConnString, _
szUserName, _
szUserPwd, _
ADS_SECURE_AUTHENTICATION)
If objContainer.Get("heuristics") <> ciExchangeServerID Then
isClustered = True
Else
isClustered = False
End If
isClusteredServer = 0
' Clean up.
Set objLdap = Nothing
Set objContainer = Nothing
Exit Function
' Error handling.
errhandler:
Set objLdap = Nothing
Set objContainer = Nothing
isClusteredServer = 1
' Implement error logging here.
Exit Function
End Function
--------------------------------------------------------------------------------
"Bharat Suneja" <bharat@nospam.org> wrote in message
news:uymlMomzFHA.2960@tk2msftngp13.phx.gbl...
[quote]Hi All,
When you discover all Exchange servers in an Org (through the
Configuration partition), how can you discover which servers are actually
Exchange Virtual Servers (clustered)? Method should work on both platforms
(Windows/Exchange 2000/2003).
--
Bharat Suneja
MCSE, MCT
--------------------------------
[/quote] |
|
| Back to top |
|
 |
Bharat Suneja
Guest
|
Posted:
Wed Oct 12, 2005 11:49 pm Post subject:
Re: How to discover Exchange Server is an EVS (clustered)? |
|
|
Thanks much.... totally missed this in the 2003 SDK. Where can I get more
detailed documentation on the heuristics attribute of msExchExchangeServer?
--
Bharat Suneja
MCSE, MCT
--------------------------------
"Scott" <sctoney@hotamil.com> wrote in message
news:%23pj%23YpyzFHA.2076@TK2MSFTNGP14.phx.gbl...
[quote]Determining If the Specified Server Is a Clustered Server
--------------------------------------------------------------------------------
The following example determines whether the specified server is a
clustered server.
Visual Basic
'//////////////////////////////////////////////////////////////////////
' Function: isClusteredServer()
' Purpose: Determines if the specified server is a clustered server.
'
' Input: szDomainName: Domain of the Exchange
organization
' szOrganizationName: Name of Exchange Organization
' szAdministrativeGroupName: Name of Administrative Group
' szServerName: Name of server to enumerate
' szUserName: Admin Username
' szUserPwd: Admin pwd
' szDirectoryServer: Name of the Directory Server
'
' Output: isFrontEndServer: Contains Error code (if any)
' isClustered: Answer to the question
'
' Note: In order for this example to function correctly, it may be
necessary to include
' references to the following libraries: Active DS Type Library, Microsoft
CDO for
' Exchange Management Library, Microsoft Cluster Service Automation
Classes,
' Microsoft CDO for Windows 2000 Library.
'//////////////////////////////////////////////////////////////////////
Public Function isClusteredServer(ByVal szDomainName As String, _
ByVal szOrganizationName As String, _
ByVal szAdministrativeGroupName As
String, _
ByVal szServerName As String, _
ByVal szUserName As String, _
ByVal szUserPwd As String, _
ByRef isClustered As Boolean, _
ByVal szDirectoryServer) As Integer
Dim objLdap As IADsOpenDSObject
Dim objContainer As IADs
Dim szConnString As String
Dim szaDomTokens() As String
Dim szDomainDN As String
On Error GoTo errhandler
' Put the domain name into an ldap string.
szaDomTokens = Split(szDomainName, ".", -1, 1)
szDomainDN = Join(szaDomTokens, ",dc=")
szDomainDN = "dc=" & szDomainDN
' Build up the ldap connection string.
szConnString = "LDAP://" + szDirectoryServer + "/cn=" + szServerName +
_
",cn=servers,cn=" + szAdministrativeGroupName +
",cn=Administrative Groups,cn=" _
+ szOrganizationName + ",cn=Microsoft
Exchange,cn=services,cn=configuration," + _
szDomainDN
' Open up the directory with passed credentials.
Set objLdap = GetObject("LDAP:")
' Get a container object from the connection string.
Set objContainer = objLdap.OpenDSObject(szConnString, _
szUserName, _
szUserPwd, _
ADS_SECURE_AUTHENTICATION)
If objContainer.Get("heuristics") <> ciExchangeServerID Then
isClustered = True
Else
isClustered = False
End If
isClusteredServer = 0
' Clean up.
Set objLdap = Nothing
Set objContainer = Nothing
Exit Function
' Error handling.
errhandler:
Set objLdap = Nothing
Set objContainer = Nothing
isClusteredServer = 1
' Implement error logging here.
Exit Function
End Function
--------------------------------------------------------------------------------
"Bharat Suneja" <bharat@nospam.org> wrote in message
news:uymlMomzFHA.2960@tk2msftngp13.phx.gbl...
Hi All,
When you discover all Exchange servers in an Org (through the
Configuration partition), how can you discover which servers are actually
Exchange Virtual Servers (clustered)? Method should work on both
platforms (Windows/Exchange 2000/2003).
--
Bharat Suneja
MCSE, MCT
--------------------------------
[/quote]
|
|
| Back to top |
|
 |
Bharat Suneja
Guest
|
Posted:
Thu Oct 13, 2005 12:58 am Post subject:
Re: How to discover Exchange Server is an EVS (clustered)? |
|
|
Scott,
Does bit 11 of the "heuristics" attribute of the "msExchExchangeServer" AD
object reliably indicate whether or not the associated Exchange server is an
EVS?
Thanks!
--
Bharat Suneja
MCSE, MCT
--------------------------------
"Scott" <sctoney@hotamil.com> wrote in message
news:%23pj%23YpyzFHA.2076@TK2MSFTNGP14.phx.gbl...
[quote]Determining If the Specified Server Is a Clustered Server
--------------------------------------------------------------------------------
The following example determines whether the specified server is a
clustered server.
Visual Basic
'//////////////////////////////////////////////////////////////////////
' Function: isClusteredServer()
' Purpose: Determines if the specified server is a clustered server.
'
' Input: szDomainName: Domain of the Exchange
organization
' szOrganizationName: Name of Exchange Organization
' szAdministrativeGroupName: Name of Administrative Group
' szServerName: Name of server to enumerate
' szUserName: Admin Username
' szUserPwd: Admin pwd
' szDirectoryServer: Name of the Directory Server
'
' Output: isFrontEndServer: Contains Error code (if any)
' isClustered: Answer to the question
'
' Note: In order for this example to function correctly, it may be
necessary to include
' references to the following libraries: Active DS Type Library, Microsoft
CDO for
' Exchange Management Library, Microsoft Cluster Service Automation
Classes,
' Microsoft CDO for Windows 2000 Library.
'//////////////////////////////////////////////////////////////////////
Public Function isClusteredServer(ByVal szDomainName As String, _
ByVal szOrganizationName As String, _
ByVal szAdministrativeGroupName As
String, _
ByVal szServerName As String, _
ByVal szUserName As String, _
ByVal szUserPwd As String, _
ByRef isClustered As Boolean, _
ByVal szDirectoryServer) As Integer
Dim objLdap As IADsOpenDSObject
Dim objContainer As IADs
Dim szConnString As String
Dim szaDomTokens() As String
Dim szDomainDN As String
On Error GoTo errhandler
' Put the domain name into an ldap string.
szaDomTokens = Split(szDomainName, ".", -1, 1)
szDomainDN = Join(szaDomTokens, ",dc=")
szDomainDN = "dc=" & szDomainDN
' Build up the ldap connection string.
szConnString = "LDAP://" + szDirectoryServer + "/cn=" + szServerName +
_
",cn=servers,cn=" + szAdministrativeGroupName +
",cn=Administrative Groups,cn=" _
+ szOrganizationName + ",cn=Microsoft
Exchange,cn=services,cn=configuration," + _
szDomainDN
' Open up the directory with passed credentials.
Set objLdap = GetObject("LDAP:")
' Get a container object from the connection string.
Set objContainer = objLdap.OpenDSObject(szConnString, _
szUserName, _
szUserPwd, _
ADS_SECURE_AUTHENTICATION)
If objContainer.Get("heuristics") <> ciExchangeServerID Then
isClustered = True
Else
isClustered = False
End If
isClusteredServer = 0
' Clean up.
Set objLdap = Nothing
Set objContainer = Nothing
Exit Function
' Error handling.
errhandler:
Set objLdap = Nothing
Set objContainer = Nothing
isClusteredServer = 1
' Implement error logging here.
Exit Function
End Function
--------------------------------------------------------------------------------
"Bharat Suneja" <bharat@nospam.org> wrote in message
news:uymlMomzFHA.2960@tk2msftngp13.phx.gbl...
Hi All,
When you discover all Exchange servers in an Org (through the
Configuration partition), how can you discover which servers are actually
Exchange Virtual Servers (clustered)? Method should work on both
platforms (Windows/Exchange 2000/2003).
--
Bharat Suneja
MCSE, MCT
--------------------------------
[/quote] |
|
| Back to top |
|
 |
Sorry
Guest
|
Posted:
Tue Oct 18, 2005 12:24 am Post subject:
Re: How to discover Exchange Server is an EVS (clustered)? |
|
|
And now for the big question Scott....
Who what or where is "ciExchangeServerID"
http://66.249.93.104/search?q=cache:2MGoCZ-vYAEJ:www.ureader.com/message/1012098.aspx+ciExchangeServerID&hl=nl
"Scott" <sctoney@hotamil.com> schreef in bericht
news:%23pj%23YpyzFHA.2076@TK2MSFTNGP14.phx.gbl...
| Quote: | Determining If the Specified Server Is a Clustered Server
--------------------------------------------------------------------------------
The following example determines whether the specified server is a
clustered server.
Visual Basic
'//////////////////////////////////////////////////////////////////////
' Function: isClusteredServer()
' Purpose: Determines if the specified server is a clustered server.
'
' Input: szDomainName: Domain of the Exchange
organization
' szOrganizationName: Name of Exchange Organization
' szAdministrativeGroupName: Name of Administrative Group
' szServerName: Name of server to enumerate
' szUserName: Admin Username
' szUserPwd: Admin pwd
' szDirectoryServer: Name of the Directory Server
'
' Output: isFrontEndServer: Contains Error code (if any)
' isClustered: Answer to the question
'
' Note: In order for this example to function correctly, it may be
necessary to include
' references to the following libraries: Active DS Type Library, Microsoft
CDO for
' Exchange Management Library, Microsoft Cluster Service Automation
Classes,
' Microsoft CDO for Windows 2000 Library.
'//////////////////////////////////////////////////////////////////////
Public Function isClusteredServer(ByVal szDomainName As String, _
ByVal szOrganizationName As String, _
ByVal szAdministrativeGroupName As
String, _
ByVal szServerName As String, _
ByVal szUserName As String, _
ByVal szUserPwd As String, _
ByRef isClustered As Boolean, _
ByVal szDirectoryServer) As Integer
Dim objLdap As IADsOpenDSObject
Dim objContainer As IADs
Dim szConnString As String
Dim szaDomTokens() As String
Dim szDomainDN As String
On Error GoTo errhandler
' Put the domain name into an ldap string.
szaDomTokens = Split(szDomainName, ".", -1, 1)
szDomainDN = Join(szaDomTokens, ",dc=")
szDomainDN = "dc=" & szDomainDN
' Build up the ldap connection string.
szConnString = "LDAP://" + szDirectoryServer + "/cn=" + szServerName +
_
",cn=servers,cn=" + szAdministrativeGroupName +
",cn=Administrative Groups,cn=" _
+ szOrganizationName + ",cn=Microsoft
Exchange,cn=services,cn=configuration," + _
szDomainDN
' Open up the directory with passed credentials.
Set objLdap = GetObject("LDAP:")
' Get a container object from the connection string.
Set objContainer = objLdap.OpenDSObject(szConnString, _
szUserName, _
szUserPwd, _
ADS_SECURE_AUTHENTICATION)
If objContainer.Get("heuristics") <> ciExchangeServerID Then
isClustered = True
Else
isClustered = False
End If
isClusteredServer = 0
' Clean up.
Set objLdap = Nothing
Set objContainer = Nothing
Exit Function
' Error handling.
errhandler:
Set objLdap = Nothing
Set objContainer = Nothing
isClusteredServer = 1
' Implement error logging here.
Exit Function
End Function
--------------------------------------------------------------------------------
"Bharat Suneja" <bharat@nospam.org> wrote in message
news:uymlMomzFHA.2960@tk2msftngp13.phx.gbl...
Hi All,
When you discover all Exchange servers in an Org (through the
Configuration partition), how can you discover which servers are actually
Exchange Virtual Servers (clustered)? Method should work on both
platforms (Windows/Exchange 2000/2003).
--
Bharat Suneja
MCSE, MCT
--------------------------------
|
|
|
| Back to top |
|
 |
|
|
|
|