fix: 2.1.4 simplified output and added object comment

This commit is contained in:
DrIOS
2024-06-28 20:53:50 -05:00
parent c05ba5aebd
commit 37b6557221
2 changed files with 57 additions and 55 deletions

View File

@@ -261,6 +261,18 @@ function Get-CISExoOutput {
if (Get-Command Get-SafeAttachmentPolicy -ErrorAction SilentlyContinue) {
# Retrieve all Safe Attachment policies where Enable is set to True
# Check if ErrorAction needed below
# $safeAttachmentPolicies Mock Object:
<#
$safeAttachmentPolicies = @(
[PSCustomObject]@{
Policy = "Strict Preset Security Policy"
Action = "Block"
QuarantineTag = "AdminOnlyAccessPolicy"
Redirect = $false
Enabled = $true
}
)
#>
$safeAttachmentPolicies = Get-SafeAttachmentPolicy -ErrorAction SilentlyContinue | Where-Object { $_.Enable -eq $true }
# [object[]]
return $safeAttachmentPolicies