4 Commits

Author SHA1 Message Date
Doug Rios
170217752f Merge pull request #128 from CriticalSolutionsNetwork/Revert-Export-Table-Change
Revert export table change
2024-06-28 17:11:11 -05:00
DrIOS
1fbf321449 docs: Update CHANGELOG 2024-06-28 17:09:28 -05:00
DrIOS
5909f8d3b4 fix: Get-ExceededLengthResultDetail parameter validation 2024-06-28 17:04:10 -05:00
DrIOS
8c8445c9d9 fix: Export Table Changes Reverted 2024-06-28 16:09:13 -05:00
4 changed files with 13 additions and 10 deletions

View File

@@ -4,6 +4,12 @@ The format is based on and uses the types of changes according to [Keep a Change
## [Unreleased] ## [Unreleased]
### Fixed
- Fixed `Get-ExceededLengthResultDetail` function paramter validation for Exported Tests to allow for Null.
## [0.1.16] - 2024-06-26
### Added ### Added
- Added `Grant-M365SecurityAuditConsent` function to consent to the Microsoft Graph Powershell API for a user. - Added `Grant-M365SecurityAuditConsent` function to consent to the Microsoft Graph Powershell API for a user.

View File

@@ -4,7 +4,7 @@ Import-Module .\output\module\M365FoundationsCISReport\*\*.psd1
<# <#
$ver = "v0.1.15" $ver = "v0.1.16"
git checkout main git checkout main
git pull origin main git pull origin main
git tag -a $ver -m "Release version $ver refactor Update" git tag -a $ver -m "Release version $ver refactor Update"

View File

@@ -9,7 +9,7 @@ function Get-ExceededLengthResultDetail {
[Parameter(Mandatory = $true, ParameterSetName = 'ReturnExceedingTests')] [Parameter(Mandatory = $true, ParameterSetName = 'ReturnExceedingTests')]
[string[]]$TestNumbersToCheck, [string[]]$TestNumbersToCheck,
[Parameter(Mandatory = $true, ParameterSetName = 'UpdateArray')] [Parameter(Mandatory = $false, ParameterSetName = 'UpdateArray')]
[string[]]$ExportedTests, [string[]]$ExportedTests,
[Parameter(Mandatory = $true, ParameterSetName = 'ReturnExceedingTests')] [Parameter(Mandatory = $true, ParameterSetName = 'ReturnExceedingTests')]

View File

@@ -61,8 +61,8 @@ function Export-M365SecurityAuditTable {
[ValidateSet("1.1.1", "1.3.1", "6.1.2", "6.1.3", "7.3.4")] [ValidateSet("1.1.1", "1.3.1", "6.1.2", "6.1.3", "7.3.4")]
[string]$OutputTestNumber, [string]$OutputTestNumber,
[Parameter(Mandatory = $true, Position = 0, ParameterSetName = "ExportAllResultsFromAuditResults")] [Parameter(Mandatory = $false, Position = 0, ParameterSetName = "ExportAllResultsFromAuditResults")]
[Parameter(Mandatory = $true, Position = 0, ParameterSetName = "ExportAllResultsFromCsv")] [Parameter(Mandatory = $false, Position = 0, ParameterSetName = "ExportAllResultsFromCsv")]
[switch]$ExportAllTests, [switch]$ExportAllTests,
[Parameter(Mandatory = $true, ParameterSetName = "ExportAllResultsFromAuditResults")] [Parameter(Mandatory = $true, ParameterSetName = "ExportAllResultsFromAuditResults")]
@@ -201,12 +201,9 @@ function Export-M365SecurityAuditTable {
if ($ExportOriginalTests) { if ($ExportOriginalTests) {
# Define the test numbers to check # Define the test numbers to check
$TestNumbersToCheck = "1.1.1", "1.3.1", "6.1.2", "6.1.3", "7.3.4" $TestNumbersToCheck = "1.1.1", "1.3.1", "6.1.2", "6.1.3", "7.3.4"
if ($exportedTests.Count -gt 0) {
$updatedAuditResults = Get-ExceededLengthResultDetail -AuditResults $AuditResults -TestNumbersToCheck $TestNumbersToCheck -ExportedTests $exportedTests -DetailsLengthLimit 30000 -PreviewLineCount 25 # Check for large details and update the AuditResults array
} $updatedAuditResults = Get-ExceededLengthResultDetail -AuditResults $AuditResults -TestNumbersToCheck $TestNumbersToCheck -ExportedTests $exportedTests -DetailsLengthLimit 30000 -PreviewLineCount 25
else {
$updatedAuditResults = $auditResults
}
$originalFileName = "$ExportPath\$timestamp`_M365FoundationsAudit.csv" $originalFileName = "$ExportPath\$timestamp`_M365FoundationsAudit.csv"
if ($ExportToExcel) { if ($ExportToExcel) {
$xlsxPath = [System.IO.Path]::ChangeExtension($originalFileName, '.xlsx') $xlsxPath = [System.IO.Path]::ChangeExtension($originalFileName, '.xlsx')