đ¤ Exporting results
Maester supports exporting test results to CSV and Excel files. This is useful for sharing test results with others or for further analysis in a spreadsheet program.
Maester also lists the objects affected by each check, and redact user identities from any of the generated files.
Exporting a markdown summary
Section titled âExporting a markdown summaryâTo export a compact markdown summary that contains only the counters table, use Invoke-Maester with -OutputMarkdownSummaryFile.
Invoke-Maester -OutputMarkdownSummaryFile "C:\path\to\results-summary.md"This summary is useful for quick updates in issues, pull requests, and chat messages.
Exporting results to CSV
Section titled âExporting results to CSVâTo export test results to a CSV file, use the Convert-MtResultsToFlatObject command with the -CsvFilePath parameter. The following example exports test results to a CSV file:
$results = Invoke-Maester -PassThruConvert-MtResultsToFlatObject -InputObject $results -CsvFilePath "C:\path\to\results.csv"Exporting results to Excel
Section titled âExporting results to ExcelâTo export test results to an Excel file, use the Convert-MtResultsToFlatObject command with the -ExcelFilePath parameter.
The following example exports test results to an Excel file:
$results = Invoke-Maester -PassThruConvert-MtResultsToFlatObject -InputObject $results -ExcelFilePath "C:\path\to\results.xlsx"Flattening results
Section titled âFlattening resultsâTo export just the test results without the test suite hierarchy, use the -PassThru parameter with the Convert-MtResultsToFlatObject command. The following example exports flattened test results.
$results = Invoke-Maester -PassThruConvert-MtResultsToFlatObject -InputObject $results -PassThruAffected objects
Section titled âAffected objectsâMaester can list the affected objects: the consolidated list of objects that the run touched â Entra ID objects such as Conditional Access policies, users, groups and service principals, tenant-level configuration surfaces, the Microsoft Graph resources that were read, and external systems such as GitHub.
Collection is opt-in, because it makes the report larger. Use -IncludeAffectedObjects:
$results = Invoke-Maester -IncludeAffectedObjects -PassThru$results.AffectedObjects | Where-Object Type -eq 'ConditionalAccessPolicy'The HTML report then has an Affected objects page, with the checks that passed or failed for each object and a link to open it in the admin portal. Without the switch, nothing is collected and the page is not offered.
When you also use -OutputFolder, the list is written next to the other reports as
<name>-affected-objects.json. Adding -ExportCsv also writes <name>-affected-objects.csv.
Invoke-Maester -IncludeAffectedObjects -OutputFolder "C:\path\to\results" -ExportCsvEach object carries a UniqueId that is derived from its identity, so the same object keeps the
same id across runs and can be correlated between reports.
Hiding user identities from reports
Section titled âHiding user identities from reportsâReports that are shared beyond the security team often should not name individual users. Use
-RedactUserIdentity to replace user display names, user principal names and user object ids with the userâs
UniqueId from the affected objects:
| Value | Effect |
|---|---|
None (default) | No redaction. |
HtmlOnly | Redact the html report only, so the machine readable exports keep the real identifiers for follow-up. |
AllOutputs | Redact every generated output: html, json, markdown, markdown summary, csv, Excel and the affected objects json/csv. |
Use AllOutputs when any file besides the html report leaves the security team, for example as a
pipeline artifact or mail attachment.
Invoke-Maester -OutputFolder "C:\path\to\results" -RedactUserIdentity AllOutputsRedaction is driven by the affected objects, so -RedactUserIdentity collects them automatically.
They stay internal to the redaction step unless you also pass -IncludeAffectedObjects.
The same parameter is available on Get-MtHtmlReport when you generate the html report yourself.