From 5125d7f6842e3d4c7c4a72b236dcb2952de8a5f8 Mon Sep 17 00:00:00 2001 From: DrIOS <58635327+DrIOSX@users.noreply.github.com> Date: Sun, 30 Jun 2024 09:21:41 -0500 Subject: [PATCH] fix: Corrected logic for 8.1.1 --- source/tests/Test-TeamsExternalFileSharing.ps1 | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/source/tests/Test-TeamsExternalFileSharing.ps1 b/source/tests/Test-TeamsExternalFileSharing.ps1 index 9fe0374..a830713 100644 --- a/source/tests/Test-TeamsExternalFileSharing.ps1 +++ b/source/tests/Test-TeamsExternalFileSharing.ps1 @@ -27,17 +27,18 @@ function Test-TeamsExternalFileSharing { # Assuming that 'approvedProviders' is a list of approved cloud storage service names # This list must be defined according to your organization's approved cloud storage services $clientConfig = Get-CISMSTeamsOutput -Rec $recnum - $approvedProviders = @("AllowDropBox", "AllowBox", "AllowGoogleDrive", "AllowShareFile", "AllowEgnyte") + $unapprovedProviders = @("AllowDropBox", "AllowBox", "AllowGoogleDrive", "AllowShareFile", "AllowEgnyte") $isCompliant = $true $nonCompliantProviders = @() - foreach ($provider in $approvedProviders) { - if (-not $clientConfig.$provider) { + foreach ($provider in $unapprovedProviders) { + if ($clientConfig.$provider) { $isCompliant = $false $nonCompliantProviders += $provider } } + # Create an instance of CISAuditResult and populate it # Create an instance of CISAuditResult and populate it $params = @{ Rec = $recnum