From a9e44a7c6f43a8fddc6b76d12abc41edb3c86886 Mon Sep 17 00:00:00 2001 From: DrIOS <58635327+DrIOSX@users.noreply.github.com> Date: Wed, 5 Jun 2024 15:07:04 -0500 Subject: [PATCH] fix: Removed nested functions in 6.1.2/6.1.3 --- source/tests/Test-MailboxAuditingE3.ps1 | 27 ------------------------- source/tests/Test-MailboxAuditingE5.ps1 | 27 ------------------------- 2 files changed, 54 deletions(-) diff --git a/source/tests/Test-MailboxAuditingE3.ps1 b/source/tests/Test-MailboxAuditingE3.ps1 index eac96d6..9828941 100644 --- a/source/tests/Test-MailboxAuditingE3.ps1 +++ b/source/tests/Test-MailboxAuditingE3.ps1 @@ -91,30 +91,3 @@ function Test-MailboxAuditingE3 { return $auditResult } } - -function Format-MissingActions { - param ([array]$missingActions) - - $actionGroups = @{ - "Admin" = @() - "Delegate" = @() - "Owner" = @() - } - - foreach ($action in $missingActions) { - if ($action -match "(Admin|Delegate|Owner) action '([^']+)' missing") { - $type = $matches[1] - $actionName = $matches[2] - $actionGroups[$type] += $actionName - } - } - - $formattedResults = @() - foreach ($type in $actionGroups.Keys) { - if ($actionGroups[$type].Count -gt 0) { - $formattedResults += "$($type) actions missing: $($actionGroups[$type] -join ', ')" - } - } - - return $formattedResults -join '; ' -} diff --git a/source/tests/Test-MailboxAuditingE5.ps1 b/source/tests/Test-MailboxAuditingE5.ps1 index 3c84096..f38c008 100644 --- a/source/tests/Test-MailboxAuditingE5.ps1 +++ b/source/tests/Test-MailboxAuditingE5.ps1 @@ -97,30 +97,3 @@ function Test-MailboxAuditingE5 { return $auditResult } } - -function Format-MissingActions { - param ([array]$missingActions) - - $actionGroups = @{ - "Admin" = @() - "Delegate" = @() - "Owner" = @() - } - - foreach ($action in $missingActions) { - if ($action -match "(Admin|Delegate|Owner) action '([^']+)' missing") { - $type = $matches[1] - $actionName = $matches[2] - $actionGroups[$type] += $actionName - } - } - - $formattedResults = @() - foreach ($type in $actionGroups.Keys) { - if ($actionGroups[$type].Count -gt 0) { - $formattedResults += "$($type) actions missing: $($actionGroups[$type] -join ', ')" - } - } - - return $formattedResults -join '; ' -}