Whenever a new PowerShell health or best practices script comes out, I usually need to run through it to see how I can use with my client engagements as a consultant. If this new script turns out to be useful or can provide useful feedback for a client, I integrate it into my toolbox. For this blog article we will explore the Microsoft Compliance Configuration Analyzer (MCCA) Preview Module which can be found here: https://www.powershellgallery.com/packages/MCCAPreview/.
Now, for those familiar with the ORCA PowerShell module which reviews your Microsoft Defender for Office 365 (aka AP) configuration, then the MCCA script will look familiar. The execution process and output provided (HTML report) are along the same format. First, let’s review how to download and install the module, then we can do a sample run and review the output of the script.
Downloads and Install
Currently the module is at version 1.3 and still listed as a preview module. Expect this module to change a lot of the coming months until it exits preview. According to the web page for this module, we can download the module with this cmdlet:
Install-Module -Name MCCAPreview
Load the module into your PowerShell session:
Import-Module MCCAPreview
Verify the module is loaded:
Get-Module MCCAPreivew
Using the Module
Now that we have the module loaded, let’s see how we can use it:.
Notice when we ran Get-Module MCCAPreview, we see there is a column that shows ‘ExportedCommands’ which shows the two cmdlets that are imported with the module. The main cmdlet we want to use is Get-MCCAReport:
Get-Help Get-MCCAReport -Examples
As we can see, there is a generic option to run just Get-MCCAReport which is the simplest way to get your toes wet for this module. If we check the available switches and parameters, we see there aren’t that many to work with:
Let’s run the cmdlet with no options to see what output we receive:
Sample Run
Sample HTML Report
So what do we get from this report? We get a list of items that are color organized for us in the form of Informational, Improvement and OK:
Once the script has generated, we should review all Improvements and Recommendations to see what we can fix.
Sample Improvements
What is nice about these reports is that we have links to the affected as well as documentation for the fix.
Invoke-MCCA
Recommended Actions
- Download the module
- Run the module
- Read the report
- Fix any actionable items