Best Practices Analyzer
24, AprIn this article I talk about the Best Practices Analyzer, which is delivered with your Windows OS.
Get an audit in seconds for free, with PowerShell.
Windows Server 2008 R2 and newer OS have a Best Practices Analyzer on board. It can tell you, for instance, whether your configuration is compliant with known best practices. The available models depend on the roles and the version your server has.
Using PowerShell it takes only a few seconds to get the full report.
PS> Import-Module ServerManager
PS> Import-Module BestPractices
PS> Get-BpaModel
Now you have a full overview of all available models you can test on this computer. Choose one from the list and start the audit:
PS> Invoke-BpaModel Microsoft/Windows/DirectoryServices
PS> Get-BpaResult Microsoft/Windows/DirectoryServices | ?{$_.severity -ne "Information"}
This oneliner filters out all informational messages and presents you only the warnings and errors and worse.
You may want to save the output to a text file at once.
Just add an Out-file:
PS> Get-BpaResult Microsoft/Windows/DirectoryServices | ?{$_.severity -ne "Information"} | Out-File BPArapport.txt
Apparently, there is a problem to return the results over WSMan: