Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

How to determine if an Exchange Server is a front-end server or a back-end server


View products that this article applies to.

This article was previously published under Q322887

↑ Back to the top


Introduction

This article describes how to programmatically determine if a Microsoft Exchange Server is configured as a front-end server or as a back-end server.

↑ Back to the top


More information

The following sample code uses the Microsoft Collaboration Data Objects for Exchange Management (CDOEXM) IExchangeServer interface to determine if an Exchange Server is configured as a front-end server or as a back-end server. This sample code must be run on a computer that has the Exchange System Manager (ESM) tools installed. If the Exchange Server is not configured with either a front-end configuration or a back-end configuration, this sample code treats the Exchange Server as a back-end server.
  1. Create a .vbs file
  2. Paste the following code in the .vbs file:
    'TODO: Set the following strings to reflect your environment:
    SERVERNAME = "MyServer"
    OrganizationName = "MyExchangeOrganization"
    DomainName="MyDomain"
    UpperLevelDomain = "MyUpperLevelDomain"
    
    Set obj = CreateObject("CDOEXM.ExchangeServer")
    
    obj.datasource.open ("LDAP://" & SERVERNAME & "/CN=" & SERVERNAME &_
    ",CN=Servers,CN=First Administrative Group,CN=Administrative Groups,CN="&_ 
    OrganizationName &",CN=Microsoft Exchange,CN=Services, CN=Configuration,DC="&_ 
    DomainName&",DC=" & UpperLevelDomain)  
    
    If (obj.servertype = 0) Then
        msgbox obj.name & " is a back-end Exchange Server or is not configured as a front-end server or as a back-end server."  
    Else   
        msgbox obj.name & " is a front-end Exchange Server."  
    End If
    
  3. Search for the TODO text string in the sample code, and then modify the sample code for your environment.
  4. Run the code.

↑ Back to the top


References

For additional information about the IExchangeServer interface, visit the following Microsoft Developer Network (MSDN) Web site:

↑ Back to the top


Keywords: KB322887, kbhowto

↑ Back to the top

Article Info
Article ID : 322887
Revision : 3
Created on : 10/25/2007
Published on : 10/25/2007
Exists online : False
Views : 515