From 686e805f6a77951fae0cf33e2bb3422e2d4e24f2 Mon Sep 17 00:00:00 2001 From: DrIOS <58635327+DrIOSX@users.noreply.github.com> Date: Sat, 3 Aug 2024 11:42:59 -0500 Subject: [PATCH] Fix: Vaugue parameter name --- source/M365FoundationsCISReport.psd1 | 2 +- source/Public/Export-M365SecurityAuditTable.ps1 | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/source/M365FoundationsCISReport.psd1 b/source/M365FoundationsCISReport.psd1 index 98dfe2b..2d9971e 100644 --- a/source/M365FoundationsCISReport.psd1 +++ b/source/M365FoundationsCISReport.psd1 @@ -33,7 +33,7 @@ Copyright = '(c) 2024 Douglas S. Rios (DrIOSx). All rights reserved.' Description = 'Automated assessment of 50 CIS 365 Foundations v3.0.0 benchmark.' # Minimum version of the Windows PowerShell engine required by this module -PowerShellVersion = '5.1' +# PowerShellVersion = '5.1' # Name of the Windows PowerShell host required by this module # PowerShellHostName = '' diff --git a/source/Public/Export-M365SecurityAuditTable.ps1 b/source/Public/Export-M365SecurityAuditTable.ps1 index d8fdae0..31c12ec 100644 --- a/source/Public/Export-M365SecurityAuditTable.ps1 +++ b/source/Public/Export-M365SecurityAuditTable.ps1 @@ -11,7 +11,7 @@ The path to a CSV file containing the audit results. This parameter is mandatory when exporting from a CSV file. .PARAMETER OutputTestNumber The test number to output as an object. Valid values are "1.1.1", "1.3.1", "6.1.2", "6.1.3", "7.3.4". This parameter is used to output a specific test result. - .PARAMETER ExportAllTests + .PARAMETER ExportNestedTables Switch to export all test results. When specified, all test results are exported to the specified path. .PARAMETER ExportPath The path where the CSV or Excel files will be exported. This parameter is mandatory when exporting all tests. @@ -28,22 +28,22 @@ Export-M365SecurityAuditTable -AuditResults $object -OutputTestNumber 6.1.2 # Outputs the result of test number 6.1.2 from the provided audit results as an object. .EXAMPLE - Export-M365SecurityAuditTable -ExportAllTests -AuditResults $object -ExportPath "C:\temp" + Export-M365SecurityAuditTable -ExportNestedTables -AuditResults $object -ExportPath "C:\temp" # Exports all audit results to the specified path in CSV format. .EXAMPLE Export-M365SecurityAuditTable -CsvPath "C:\temp\auditresultstoday1.csv" -OutputTestNumber 6.1.2 # Outputs the result of test number 6.1.2 from the CSV file as an object. .EXAMPLE - Export-M365SecurityAuditTable -ExportAllTests -CsvPath "C:\temp\auditresultstoday1.csv" -ExportPath "C:\temp" + Export-M365SecurityAuditTable -ExportNestedTables -CsvPath "C:\temp\auditresultstoday1.csv" -ExportPath "C:\temp" # Exports all audit results from the CSV file to the specified path in CSV format. .EXAMPLE - Export-M365SecurityAuditTable -ExportAllTests -AuditResults $object -ExportPath "C:\temp" -ExportOriginalTests + Export-M365SecurityAuditTable -ExportNestedTables -AuditResults $object -ExportPath "C:\temp" -ExportOriginalTests # Exports all audit results along with the original test results to the specified path in CSV format. .EXAMPLE - Export-M365SecurityAuditTable -ExportAllTests -CsvPath "C:\temp\auditresultstoday1.csv" -ExportPath "C:\temp" -ExportOriginalTests + Export-M365SecurityAuditTable -ExportNestedTables -CsvPath "C:\temp\auditresultstoday1.csv" -ExportPath "C:\temp" -ExportOriginalTests # Exports all audit results from the CSV file along with the original test results to the specified path in CSV format. .EXAMPLE - Export-M365SecurityAuditTable -ExportAllTests -AuditResults $object -ExportPath "C:\temp" -ExportToExcel + Export-M365SecurityAuditTable -ExportNestedTables -AuditResults $object -ExportPath "C:\temp" -ExportToExcel # Exports all audit results to the specified path in Excel format. .LINK https://criticalsolutionsnetwork.github.io/M365FoundationsCISReport/#Export-M365SecurityAuditTable @@ -65,7 +65,7 @@ function Export-M365SecurityAuditTable { [string]$OutputTestNumber, [Parameter(Mandatory = $false, Position = 0, ParameterSetName = "ExportAllResultsFromAuditResults")] [Parameter(Mandatory = $false, Position = 0, ParameterSetName = "ExportAllResultsFromCsv")] - [switch]$ExportAllTests, + [switch]$ExportNestedTables, [Parameter(Mandatory = $true, ParameterSetName = "ExportAllResultsFromAuditResults")] [Parameter(Mandatory = $true, ParameterSetName = "ExportAllResultsFromCsv")] [string]$ExportPath, @@ -102,7 +102,7 @@ function Export-M365SecurityAuditTable { Initialize-CISAuditResult @params } } - if ($ExportAllTests) { + if ($ExportNestedTables) { $TestNumbers = "1.1.1", "1.3.1", "6.1.2", "6.1.3", "7.3.4" } $results = @()