Best Practices Analyzer in Server Core 2012

I always liked the Best Practices Analyzers in Windows Server, where you could scan most of the installed roles for "best practices" and it would inform you if you had any errors or warnings in your setup.  It's just a nice little sanity check to make sure you didn't forget any major steps when installing AD Directory Services, or a DNS server, etc.  Traditionally, you'd initiate the Best Practices Analyzer from within Server Manager.

So what about Server Core, when you have no GUI? Well I'm glad you asked.

Get-BPAModel

That command will list all of the available Best Practices Analyzer modules that are installed on the current system. You use the module ID, such as "Microsoft/Windows/DirectoryServices" to run the BPA, like so:

Invoke-BPAModel Microsoft/Windows/DNSServer

The above command will run the Best Practices Analyzer on the specified role. The results from the BPA are written to disk, so to retrieve the results from your last BPA scan at any time, you do:

Get-BPAResult Microsoft/Windows/Hyper-V

If you wanted to only see the results where a potential problem was found, try this:

Get-BPAResult Microsoft/Windows/DirectoryServices | ? {$_.Problem -ne $null}

 

Comments are closed