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.
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:
Open the Exchange Management Shell.
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.
Run the following command to display the output of the ExBPAcmd.exe tool:
Write-Host $exBPAoutput
These commands enable the event log register.
Before running this script, ensure that the following permissions and memberships exist.
Component |
Required Permissions and Memberships |
---|---|
Account running the AppManager agent service (netiqmc) |
|
Exchange Best Practice Analyzer tool (for all Exchange Server roles) |
|
Exchange_ClientAccessServer
Exchange_EdgeTransportServer
Exchange_HubTransportServer
Exchange_MailboxServer
By default, this script runs every one hour.
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:
|
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. |