Automating Exchange Best Practices Analyzer (ExBPA)

By Andrei Ungureanu - Last updated: Monday, May 28, 2012 - Save & Share - Leave a Comment

ExBPA poate avertiza asupra unor probleme pe care nu toata lumea le sesizeaza. De asta e si bine ca din cand in cand sa mai rulam un ExBPA si sa analizam output-ul. Asta nu inseamna ca trebuie sa ne incredem orbeste in output-ul de acolo si sa incercam sa “reparam” fiecare eroare sesizata. Informatiile de acolo trebuie analizate iar in unele cazuri erorile trebuiesc dovedite pentru ca si ExBPA-ul mai spune cateodata si prostii. Dar sa revenim; e totusi util pentru ca scaneaza environmentul mult mai rapid ca o fiinta umana si poate detecta anumite probleme.

Insa convenabil ar fi sa putem primi raportul generat via email in fiecare luni dimineata, nu? Se poate, cu ExBPACMD.EXE (e parte din Exchange 2010) iar sintaxa o aveti mai jos:

C:\Users\andrei>exbpacmd /?
Usage: C:\Program Files\Microsoft\Exchange Server\V14\bin\ExBPACmd.exe [<options
>]

Options:
  -cfg <file>  Read the settings and rules from configuration <file>.
               The default is ExBPA.Config.xml in \program files\exbpa\<lang>.
  -dat <file>  Write the output data to <file>.  The default is
               output.<label>.<timestamp>.xml in the exbpa output directory.
  -in <file>   Load the data in <file> prior to the new run.  This can be
               used to collect data from additional scopes in the same file,
               or to reanalyze previous data.  If <file> is "$",
               it will use the output.<label>.<ts>.xml with the most recent
               timestamp.
  -d <server>  Access the directory using the global catalog server <server>.
               If not given, it will bind to the nearest one.
  -l <label>   Specify a <label> in the output.
  -u <context> [<domain>\]<user> (<password>|*) …
               Provides separate credentials per context.
  -r <option>[=<value>][,…]
               Restrict the collection/analysis to include the specified
               restriction.  The default is "Health Check".
  -th <#>      Run a maximum of <#> threads at once (default 500).
  -to <#>      Timeout on data access after <#> seconds (default 300).
  -c           Collect data specified in the config file.  If no other
               operation steps are specified, this is enabled by default
  -a           Analyze the data using the rules from config XML file.
  -e           Strip off the values of any settings marked NotForExport.
  -s           Use the parameters stored in the registry by the GUI for
               scheduled runs.
  -?           Display this information.

Example: ExBPACmd.exe -dat output.xml -u ADLOGON food\administrator P@ssw0rd EXL
OGON food\administrator P@ssw0rd -r "General,Level 3,Server=FOO-01|FOO-02" -c -a

Valid restrictions options:
   Scope: Server,AdminGroup,Organization,Domain,ADC Server,_
   Role: Mailbox,Gateway,Bridgehead,ClientAccess,UnifiedMessaging,Global,AdminTo
ols,LanguagePacks,UmLanguagePack
   Task: Health,Perf,Permissions,UserPermissions,ConnectivityTask,BaselineTask,P
recheckInstall,PrecheckUninstall,PrecheckUpgrade,PrecheckDR,Postcheck
   Level: 1,2,3,4,5
   Category: General,Performance,Security,EndUserPermissions,Connectivity,Baseli
ne,CustomBaseline,Prereqs
Valid security contexts: ADLOGON,EXLOGON

This tool gathers configuration information from a system and analyzes it agains
t best practices.  It then reports on best practice mismatches.

 

Problema e ca output-ul e generat in XML si e aproape imposibil de descifrat intr-un email. Dar pentru asta am gasit un parser facut in Powershell special pentru ExBPA. Il gasiti in link-ul de mai jos:

http://gallery.technet.microsoft.com/scriptcenter/680b3a66-2b7b-4baa-b178-0c1c1323be8d

Parser-ul poate filtra chiar si dupa tipul informatiilor din raport (gen Error, Warning). Tot ce mai trebuie sa faceti este sa folositi informatiile prezentate aici pentru a face un script care genereaza raportul, parseaza output-ul asa cum doriti si sa trimita un email cu informatiile obtinute.

Posted in Exchange • Tags: Top Of Page

Write a comment