fix: 2.1.1 simplified output and added object comment

This commit is contained in:
DrIOS
2024-06-28 19:38:50 -05:00
parent 5ebb2a6e7d
commit 712077b8f1
2 changed files with 32 additions and 3 deletions

View File

@@ -11,7 +11,7 @@ function Test-SafeLinksOfficeApps {
#. .\source\Classes\CISAuditResult.ps1
# Initialization code, if needed
$recnum = "2.1.1"
Write-Verbose "Running Test-SafeLinksOfficeApps for $recnum..."
<#
Conditions for 2.1.1 (L2) Ensure Safe Links for Office Applications is Enabled
@@ -49,7 +49,7 @@ function Test-SafeLinksOfficeApps {
# Prepare the final result
# Condition B: Ensuring no misconfigurations
$result = $misconfiguredDetails.Count -eq 0
$details = if ($result) { "All Safe Links policies are correctly configured." } else { $misconfiguredDetails -join ' | ' }
$details = if ($result) { "All Safe Links policies are correctly configured." } else { $misconfiguredDetails -join '`n' }
$failureReasons = if ($result) { "N/A" } else { "The following Safe Links policies settings do not meet the recommended configuration: $($misconfiguredDetails -join ' | ')" }
# Create and populate the CISAuditResult object