Article ID: 322887 - Last Review: October 25, 2007 - Revision: 1.2

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

This article was previously published under Q322887
Expand all | Collapse all

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.

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.

REFERENCES

For additional information about the IExchangeServer interface, visit the following Microsoft Developer Network (MSDN) Web site:
http://msdn.microsoft.com/en-us/library/ms876504(EXCHG.65).aspx (http://msdn.microsoft.com/en-us/library/ms876504(EXCHG.65).aspx)

APPLIES TO
  • Microsoft Exchange 2000 Server Standard Edition
  • Microsoft Exchange Server 2003 Enterprise Edition
  • Microsoft Active Directory Service Interfaces 2.5
  • Microsoft Collaboration Data Objects for Exchange Management 1.1
Keywords: 
kbhowto KB322887
 

Article Translations