From 949a2aaa43a6b7af3baa0a9bf5bf1cb326bb9e79 Mon Sep 17 00:00:00 2001 From: DrIOS <58635327+DrIOSX@users.noreply.github.com> Date: Sat, 15 Jun 2024 22:12:45 -0500 Subject: [PATCH] fix: formatting --- source/Public/Export-M365SecurityAuditTable.ps1 | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/source/Public/Export-M365SecurityAuditTable.ps1 b/source/Public/Export-M365SecurityAuditTable.ps1 index 8d7d4b7..02cb448 100644 --- a/source/Public/Export-M365SecurityAuditTable.ps1 +++ b/source/Public/Export-M365SecurityAuditTable.ps1 @@ -143,7 +143,8 @@ function Export-M365SecurityAuditTable { $fileName = "$ExportPath\$($timestamp)_$($result.TestNumber).$($testDef.TestFileName -replace '\.ps1$').csv" if ($result.Details.Count -eq 0) { Write-Information "No results found for test number $($result.TestNumber)." -InformationAction Continue - } else { + } + else { $result.Details | Export-Csv -Path $fileName -NoTypeInformation } } @@ -153,9 +154,11 @@ function Export-M365SecurityAuditTable { $originalFileName = "$ExportPath\$timestamp`_M365FoundationsAudit.csv" $AuditResults | Export-Csv -Path $originalFileName -NoTypeInformation } - } elseif ($OutputTestNumber) { + } + elseif ($OutputTestNumber) { return $results[0].Details - } else { + } + else { Write-Error "No valid operation specified. Please provide valid parameters." } }