Continuing our previous post on Exchange 2007 Setup, this blog post goes into explanation of what are different log files that are created by Exchange setup and how to use them to troubleshoot setup issues.

Prerequisite failures

If you fail a prerequisite condition, then the text will be logged to the console during the Exchange installation process. There are a couple of files that you should look at to troubleshoot the issue:

ExchangeSetup.log file:

  • Located at %SystemDrive%\ExchangeSetupLogs.
  • The parameters that were passed to BPA will be listed

For example:

[23:44:29] Executing [Test-SetupHealth ScanType:'PrecheckInstall' Role:'Gateway']...

BPA output file:

  • Located in ExchangeSetupLogs\PreReqs
  • The naming convention is: ExBPA.<datetime>.data.xml
  • The contents and structure of this file will closely resemble the ExBPA.Config.xml file. There will be one output XML file created for each call to Test-SetupHealth.

Information found in the EXBPA.config.xml file should help to determine why the prerequisite failed:

  1. To determine the parameters of setup navigate to the end of the second line of XML to see a Restrictions attribute.
  2. Within the <Message> elements you'll see the same text as what you saw logged to the console when setup failed
  3. Just above the <Message> element you will find the corresponding rule and conditions that were tested.

Reviewing Exchange setup logs

Exchange Server 2007 Setup logs are contained within the C:\ExchangeSetupLogs folder for all phases of the installation. The setup logs contain detailed information about setup process and steps. There are two primary logs files used: ExchangeSetup.log and ExchangeSetup.msilog. ExchangeSetup.log is the primary log to use while troubleshooting setup related issues.

ExchangeSetup.log
This log file is new to Exchange and contains more information about the tasks that are run in setup. In addition, data previously recorded in the Exchange Server Setup Progress.log, which was used in previous versions of Exchange, is now merged into the ExchangeSetup.log. The information contained in this log is information related to the configuration data. The ExchangeSetup.log is always logged with the timestamp of the local server.

ExchangeSetup.msilog
This log file contains information about the unpack phase of setup where the Microsoft Installer copies the binaries to place them on disk from the temporary location for use during setup; example:

[1/27/2007 3:54:34 PM] [0] Setup will run the task 'install-msipackage'
[1/27/2007 3:54:34 PM] [1] Setup launched task 'install-msipackage -logfile 'C:\ExchangeSetupLogs\ExchangeSetup.msilog' -targetdirectory 'C:\Program Files\Microsoft\Exchange Server' -features 'AdminTools','Bridgehead','ClientAccess','Mailbox','UnifiedMessaging' -packagepath 'D:\C drive desktop\Exchange 2007\685.25\amd64\exchangeserver.msi' -updatesdir 'D:\C drive desktop\Exchange 2007\685.25\amd64\Updates' -PropertyValues 'DISABLEERRORREPORTING=0 PRODUCTLANGUAGELCID=1033 DEFAULTLANGUAGENAME=ENU DEFAULTLANGUAGELCID=1033'' 
[1/27/2007 3:54:34 PM] [1] Beginning processing.
[1/27/2007 3:54:35 PM] [1] Installing MSI package 'D:\C drive desktop\Exchange 2007\685.25\amd64\exchangeserver.msi'.
[1/27/2007 3:56:46 PM] [1] Ending processing.
[1/27/2007 3:56:46 PM] [0] **************

Breaking out the pieces of the ExchangeSetup.log

The ExchangeSetup.log is broken out in subcomponents highlighting different levels (indents) of setup. These levels will be used for future parsers.

  • [0] – Begin main run of a particular task
  • [1] – High level run of a specific task
  • [2] – Subset of a particular task

Setup runs begin with the following marker:

[1/27/2007 2:45:28 PM] [0] **********************************************
[1/27/2007 2:45:28 PM] [0] Starting Microsoft Exchange 2007 Setup
[1/27/2007 2:45:28 PM] [0] **********************************************

Setup runs end with the following marker:

[1/27/2007 3:13:28 PM] [0] End of Setup
[1/27/2007 3:13:28 PM] [0] **********************************************

Example of a high level run and a subset of a particular task are:

[1/27/2007 4:13:57 PM] [1] Executing '$RoleTargetVersion = "8.0.685.25"', handleError = False
[1/27/2007 4:13:57 PM] [2] Launching sub-task '$error.Clear(); $RoleFqdnOrName = "servername.domain.com"'.

Identifying Key Information

The setup log contains key information that is useful in troubleshooting. Although searching the setup log can be tedious and difficult at first, with experience it becomes easier. The following are some key pieces of information to aid in deciphering the ExchangeSetup.log. These snippets are not sequential, but meant to illustrate the type of information being discussed.

a. Type of setup run

[1/27/2007 3:13:31 PM] [0] Setup version: 8.0.685.25.
.
[1/27/2007 3:13:31 PM] [0] ExSetupUI was started with the following command: '-mode:install -sourcedir:D:\C drive desktop\Exchange 2007\685.25\amd64 /FromSetup'.
.
[1/27/2007 2:45:42 PM] [0] The installation mode is set to: 'Install'.

ExSetupUI means that setup was started using GUI (either setup.exe or Add/Remove programs)

ExSetup means that setup was started via command line (setup.com)

b. Setup Account

The logged-on user will be the security principle used during setup. This account would need to have the necessary permissions to perform the various setup operations.

[1/27/2007 3:13:31 PM] [0] Logged on user: domain\Administrator.

c. Server roles installed

Setup will search for the existence of the Exchange Configuration container, the organization and finally the server object. On a new organization installation, no containers will be found. On a new server installation, the server object will not be found.

[1/27/2007 2:45:41 PM] [0] Exchange configuration container for the organization is 'CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=domain,DC=com'.
[1/27/2007 2:45:41 PM] [0] Exchange organization container for the organization is 'CN=First Organization,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=domain,DC=com'.
[1/27/2007 3:13:35 PM] [0] Setup will search for an Exchange Server object for the local machine with name 'ServerName'.
[1/27/2007 4:05:53 PM] [1] The following roles are installed: MailboxRole
[1/27/2007 4:05:53 PM] [1] The following roles are current: MailboxRole

d. Domain controller/global catalog usage

For new organization installations, setup will find a local domain controller first. Afterwards, setup will use the Schema Master (in the case above this is the same DC) in order to extend the schema.

For an existing organization and modification of server roles, setup will communicate with the AD Provider to find a single DC that meets the proper requirements.

[1/27/2007 3:13:32 PM] [0] Setup is choosing the domain controller to use
[1/15/2006 3:13:33 PM] [0] Setup is choosing a local domain controller...
[12/15/2006 3:13:34 PM] [0] Setup has chosen the local domain controller DC.domain.com for initial queries
[1/27/2007 3:13:34 PM] [0] PrepareAD has either not been run or has not replicated to the domain controller used by Setup. Setup will attempt to use the Schema Master domain controller DC.domain.com
[12/15/2006 3:13:34 PM] [0] The schema master domain controller is available
[12/15/2006 3:13:34 PM] [0] The schema master domain controller is in the local domain; setup will use nm-e2k3.fourthcoffee.com
[12/15/2006 3:13:34 PM] [0] Setup is choosing a global catalog...
[12/15/2006 3:13:34 PM] [0] Setup has chosen the global catalog server GC.fourthcoffee.com.
[12/15/2006 3:13:35 PM] [0] Setup will use the domain controller 'DC.fourthcoffee.com'.
[12/15/2006 3:13:35 PM] [0] Setup will use the global catalog 'GC.fourthcoffee.com'.

Other ways to parse the ExchangeSetup.log file

To parse the setup log file, you can use the Get-SetupLog.ps1 script file that is located in the <SystemRoot>\Program Files\Microsoft\Exchange Server\Scripts folder to review setup log information. Use the Exchange Management Shell to run this script and parse the Exchange 2007 setup log. If you programmatically break the information in this file into smaller, related segments, this will help you diagnose setup problems. You must provide the location and name of the file to parse when you use this script.

To use the Exchange Management Shell to parse a setup log file:

1. To generate a list of all events logged during setup in a format that can be sorted or explored in the Exchange Management Shell, type the following command:

Get-SetupLog c:\exchangesetuplogs\exchangesetup.log

2. To generate a list of all events logged during setup and present the results in an indented tree format, type the following command:

Get-SetupLog c:\exchangesetuplogs\exchangesetup.log -tree

3. To generate a list of only the errors and warnings logged during setup, type the following command:

Get-SetupLog c:\exchangesetuplogs\exchangesetup.log -error

4. To generate a list of only the errors and warnings logged during setup and present the results in an indented tree format, type the following command:

Get-SetupLog c:\exchangesetuplogs\exchangesetup.log - error –tree

5. To enhance output, output can be directed to HTML using the OUT-HTML and OUT-IE scripts using the following command:

Get-SetupLog –tree:$false –error:$false | Where { $_.status –eq "Error" } | select datetime, depth, description, status | Out-HTML | Out-IE

Out-html.ps1 and out-ie.ps1 should be copied to the Exchange scripts folder. You can obtain those scripts here.

This is what the output is going to look:

You can also view the output via command line with [ERROR] highlighted in red and [WARNING] highlighted in yellow as follows:

- Jon Bradley, Nagesh Mahadev, also thanks to Malvin M. Seale