Share via


Best Practices Analyzer using PowerShell

BPA is a very ROBUST tool for troubleshooting.  It is free and downloadable from Microsoft site. Like EXBPA (Exchange BPA) BPA is Built-in in Windows Server 2008 R2 & higher version OS. GUI is also available. You can open it from Server Manager. See this snapshot of the Dashboard.

BPA using PowerShell

1. Import BestPractices Module
a) Import-Module BestPractices

Now you can check that BestPractices module has been installed using
b) Get-Module

How to find the installed Roles & Features
c) get-windowsfeature | Where {$_.Installed}

  1. Getting the BPA Role ID
    get-bpamodel
    Running this command for getting the BPA Role ID.

  2. Run the BPA Scan for ADDS.
    Invoke-BpaModel 'Microsoft/Windows/DirectoryServices'
    Here 'Microsoft/Windows/DirectoryServices' is the Role ID for "Directory Services" & Success:True means that BPA scan for ADDS has completed successfully.

  3. Getting the BPA Scan result into a Notepad.

Get-BpaResult 'Microsoft/Windows/DirectoryServices'

  1. How to find BPA scan run time?
Get-BpaModel | select id, lastscantime
  1. How to get BestPractices module commands?
<b>Get-Command -Module bestpractices</b>