add: Get-ExoOutput function and updated tests

This commit is contained in:
DrIOS
2024-06-23 14:28:51 -05:00
parent 90c5b95f35
commit 381b8ebeb8
20 changed files with 239 additions and 79 deletions

View File

@@ -38,8 +38,7 @@ function Test-NoWhitelistDomains {
# Retrieve transport rules that whitelist specific domains
# Condition A: Checking for transport rules that whitelist specific domains
$whitelistedRules = Get-TransportRule | Where-Object { $_.SetSCL -eq -1 -and $null -ne $_.SenderDomainIs }
$whitelistedRules = Get-ExoOutput -Rec $recnum
# Prepare failure reasons and details based on compliance
# Condition B: Prepare failure reasons based on the presence of whitelisted rules
$failureReasons = if ($whitelistedRules) {