From 686272d4e09bb58bbfe10abd9a2a3a04e5981762 Mon Sep 17 00:00:00 2001 From: DrIOS <58635327+DrIOSX@users.noreply.github.com> Date: Tue, 28 May 2024 14:51:24 -0500 Subject: [PATCH] fix: 8.1.1 aligned with test-template --- source/tests/Test-TeamsExternalFileSharing.ps1 | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/source/tests/Test-TeamsExternalFileSharing.ps1 b/source/tests/Test-TeamsExternalFileSharing.ps1 index 0c7d5ba..9226a64 100644 --- a/source/tests/Test-TeamsExternalFileSharing.ps1 +++ b/source/tests/Test-TeamsExternalFileSharing.ps1 @@ -1,13 +1,16 @@ function Test-TeamsExternalFileSharing { [CmdletBinding()] param ( + # Aligned # Parameters can be added here if needed ) begin { - # Dot source the class script + # Dot source the class script if necessary + #. .\source\Classes\CISAuditResult.ps1 + # Initialization code, if needed - $auditResults = @() + $auditResult = [CISAuditResult]::new() } process { @@ -30,7 +33,6 @@ function Test-TeamsExternalFileSharing { } # Create an instance of CISAuditResult and populate it - $auditResult = [CISAuditResult]::new() $auditResult.CISControlVer = "v8" $auditResult.CISControl = "3.3" $auditResult.CISDescription = "Configure Data Access Control Lists" @@ -45,12 +47,10 @@ function Test-TeamsExternalFileSharing { $auditResult.Details = if (-not $isCompliant) { "Non-approved providers enabled: $($nonCompliantProviders -join ', ')" } else { "All cloud storage services are approved providers" } $auditResult.FailureReason = if (-not $isCompliant) { "The following non-approved providers are enabled: $($nonCompliantProviders -join ', ')" } else { "N/A" } $auditResult.Status = if ($isCompliant) { "Pass" } else { "Fail" } - - $auditResults += $auditResult } end { - # Return auditResults - return $auditResults + # Return auditResult + return $auditResult } -} \ No newline at end of file +}