Recipe 4.4. Determining Whether a Server Is a Front-End ServerProblemYou need to determine whether an Exchange server is acting as a front-end server. SolutionUsing a graphical user interface
Using a command-line interfaceThe following command will query Active Directory for servers that have the ServerRole attribute defined (see the Discussion section): > dsquery * "CN=Administrative Groups, CN=<orgName>, CN=Microsoft Exchange,CN=Services,CN=Configuration,<ForestDN>" -filter (&(objectcategory=msExchExchangeServer)(serverRole=1)) -attr cn msExchServerRole For example, this command will find all front-end servers in the sixih.com AD domain: > dsquery * "CN=Administrative Groups, CN=sixih, CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=sixih,DC=com" -filter (&(objectcategory=msExchExchangeServer)(serverRole=1)) -attr cn msExchServerRole Using VBScript' This code uses ADO to query the MSExchServerRole attribute for all servers ' in the domain. ' --------------SCRIPT CONFIGURATION------------------ strBase = "<LDAP://cn=administrative groups,cn=robichaux and associates,cn=microsoft exchange,cn=services,cn=configuration, dc=robichaux,dc=net>;" ' dc=<domain> ,dc=<tld>;" strFilter = "(objectcategory=MSExchExchangeServer);" strAttrs = "ServerRole,cn;" strScope = "subtree" '---------------END CONFIGURATION--------------------- Set objConn = CreateObject("ADODB.Connection") objConn.Open "Provider=ADsDSOObject;" Set objRS = objConn.Execute(strBase & strFilter & strAttrs & strScope) objRS.MoveFirst While Not objRS.EOF strName = objRS.Fields("cn").value 'Get the value of the MSExchServerRole If objRS.Fields("ServerRole").value = 1 Then strRole = "Front-End Server" Elseif IsNull(objRS.Fields("ServerRole").value) Then strRole = "Back-End Server" Elseif objRS.Fields("ServerRole").value = 0 Then strRole = "Back-End Server" end if wscript.echo strName & " is a " & strRole objRS.MoveNext Wend DiscussionIn large Exchange deployments, you may lose track of what role an Exchange server is serving. The msExchServerRole attribute on each server object enables you to determine that server's role. A msExchServerRole value of 1 indicates a front-end server; a value of 0 indicates that the server isn't a front-end server. If you want to determine whether a non-front-end server is actually a back-end mailbox server, you can check to see if it has any mailbox databases associated with it. Using a graphical user interfaceThere's no way to grab this information from numerous servers within your organization at onceyou must point and click all the way. This is okay if you have three servers to check, but if you have twelve or twenty, you are better off using the CLI or VBScript solutions. Using a command-line interfaceDsquery is a command-line tool included in Windows Server 2003 and Windows XP. The tool is not native to Windows 2000 Server, but you can copy dsquery.exe onto a Windows 2000 Server from another computer and it will work correctly for most queries (including the ones shown here). See AlsoExchange Server 2003 and Exchange 2000 Server Front-End and Back-End Topology white paper:
|