BPA using PowerShell

BPA 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 ServerManager. 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}

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


3. 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.


4. Getting the BPA Scan result into a Notepad.
Get-BpaResult 'Microsoft/Windows/DirectoryServices'




5. How to find BPA scan run time?
Get-BpaModel | select id, lastscantime

6. How to get BestPractices module commands?
Get-Command -Module bestpractices

______________________________________________________________________________
Regards
Biswajit Biswas
My Blogs|TechnetWiki Ninja

Leave a Comment
  • Please add 6 and 3 and type the answer here:
  • Post
Wiki - Revision Comment List(Revision Comment)
Sort by: Published Date | Most Recent | Most Useful
Comments
  • Richard Mueller edited Revision 12. Comment: Changed "Windows 2008" and "Windows 2012" to "Windows Server ...", also in tags

Page 1 of 1 (1 items)
Wikis - Comment List
Sort by: Published Date | Most Recent | Most Useful
Posting comments is temporarily disabled until 10:00am PST on Saturday, December 14th. Thank you for your patience.
Comments
  • Richard Mueller edited Revision 12. Comment: Changed "Windows 2008" and "Windows 2012" to "Windows Server ...", also in tags

Page 1 of 1 (1 items)