4.6 BestPracticesAnalyzer

This Knowledge Script is obsolete, although you can continue to use it. Its functionality is provided by the All_BestPracticesAnalyzer Knowledge Script introduced with AppManager for Exchange Server 2007 version 7.3.

*******************************************************************************************************

Use this Knowledge Script to monitor the Windows Event Log for errors and warnings whose source is BPA (Exchange Best Practices Analyzer). This script raises an event if the Knowledge Script job fails or the Windows Event Log contains error and warning messages.

If you are not running the BPA, you can use this script to execute the BPA each time the script runs. If you set the Execute Best Practices Analyzer during job? parameter to Yes, AppManager runs the BPA at each iteration of the Knowledge Script job. It then stops the BPA and analyzes the Windows Event Log for errors and warnings raised by the BPA.

NOTE:This script may raise duplicate events on computers where multiple Exchange Server 2007 or 2010 roles are installed. These duplicate events are raised because the BPA populates the Windows Event Log with errors and warnings for each role when the error or warning is applicable for the entire Exchange Server 2007 or 2010 organization.

4.6.1 Running the ExBPAcmd.exe Tool Manually

The BPA must be running, launched by you or this script, so that it can submit any errors or warnings to the Windows Event Log. If you are not running the BPA and you clear the Execute Best Practices Analyzer during job? parameter, then this Knowledge Script job will not work.

If you do not enable this script to launch the BPA, then run the ExBPAcmd.exe tool manually to monitor the Windows Event Log for errors and warnings.

To run the ExBPAcmd.exe tool manually:

  1. Open the Exchange Management Shell.

  2. Run the following command:

    $exBPAoutput = . "C:\Program Files\Microsoft\Exchange Server\Bin\ExBPAcmd.exe" -p Events:Enable -r "5,$role,$scan_type,Server=<ExchangeServerName>"

    where $role must be replaced by any one of the following values enclosed in quotation marks (“ ”): Mailbox, Gateway, Bridgehead, ClientAccess, ClusterMailbox

    $scan_type must be replaced by any one of the following values enclosed in quotation marks (“ ”): Health, ConnectivityTask, Ex2007Readiness, Perf, Permissions

    and <ExchangeServerName> must be replaced with the name of your Exchange server where you want to run the ExBPAcmd.exe tool.

  3. Run the following command to display the output of the ExBPAcmd.exe tool:

    Write-Host $exBPAoutput

    These commands enable the event log register.

4.6.2 Prerequisites

Before running this script, ensure that the following permissions and memberships exist.

Component

Required Permissions and Memberships

Account running the AppManager agent service (netiqmc)

  • Membership in the Builtin\Administrators group on the Active Directory server

  • Membership in the local Administrators group on the local computer

  • Delegation for at least Exchange View-Only permissions

Exchange Best Practice Analyzer tool (for all Exchange Server roles)

  • Designation as the Domain Administrator, or membership in the Builtin\Administrators group on the Active Directory server, for enumerating the Active Directory information and calling the Microsoft Windows Management Instrumentation (WMI) providers on the domain controller and global catalog servers

  • Membership in the Local Administrators group on each Exchange server for calling the WMI providers and accessing the registry and the metabase

  • Delegation for at least Exchange View-Only Permissions on the Exchange organization

4.6.3 Resource Objects

  • Exchange_ClientAccessServer

  • Exchange_EdgeTransportServer

  • Exchange_HubTransportServer

  • Exchange_MailboxServer

4.6.4 Default Schedule

By default, this script runs every one hour.

4.6.5 Setting Parameter Values

Set the following parameters as needed:

Parameter

How to Set It

General Settings

Raise event if job fails

Event severity when job fails

Set the severity level, from 1 to 40, to indicate the importance of an event in which the BestPracticesAnalyzer job fails. The default is 5.

Raise event indicating active/passive cluster state?

Select Yes to raise an informational event indicating the current status of the cluster: active or passive. The default is No.

Analyze Exchange Server 2007 Best Practices

Execute Best Practices Analyzer during job?

Select Yes to allow AppManager to launch the BPA using a command-line execution of ExBPACmd.exe at each iteration of this script. If you are already running the BPA, then clear this option. However, the BPA must be running, launched by you or this script, so that it can submit any errors or warnings to the Windows Event Log.

The default is Yes.

Type of scan to execute

Select the type of scan the BPA should perform:

  • Connectivity Test. To scan network connections and permissions for the selected Exchange server.

  • Exchange 2007 Readiness. To assess your organization's readiness for Exchange Server 2007.

  • Health Check. To perform a full scan, checking for errors, warnings, and configuration information. This option is selected by default.

  • Permission Check. To ensure that your Exchange Server 2007 deployment has the proper credentials as defined by your organization.

Event for errors raised in Windows Event Log

Event severity for Windows Event Log errors

Set the severity level, from 1 to 40, to indicate the importance of an event in which the Windows Event Log contains error messages. The default is 10.

Raise event for warnings raised in Windows Event Log?

Select Yes to raise an event when the Windows Event Log contains warning messages raised by the BPA. The default is Yes.

Event severity for Windows Event Log warnings

Set the severity level, from 1 to 40, to indicate the importance of an event in which the Windows Event Log contains warning messages raised by the BPA. The default is 20.