fix: missing output type comments for switches

This commit is contained in:
DrIOS
2024-06-23 12:43:52 -05:00
parent c5780450e7
commit 90c5b95f35

View File

@@ -27,21 +27,28 @@ function Get-ExoOutput {
process { process {
switch ($Rec) { switch ($Rec) {
'1.2.2' { '1.2.2' {
# Test-BlockSharedMailboxSignIn.ps1
$MBX = Get-EXOMailbox -RecipientTypeDetails SharedMailbox $MBX = Get-EXOMailbox -RecipientTypeDetails SharedMailbox
# [object[]]
return $MBX return $MBX
} }
'1.3.3' { '1.3.3' {
# Test-ExternalSharingCalendars.ps1
# Step: Retrieve sharing policies related to calendar sharing # Step: Retrieve sharing policies related to calendar sharing
$sharingPolicies = Get-SharingPolicy | Where-Object { $_.Domains -like '*CalendarSharing*' } $sharingPolicies = Get-SharingPolicy | Where-Object { $_.Domains -like '*CalendarSharing*' }
# [psobject[]]
return $sharingPolicies return $sharingPolicies
} }
'1.3.6' { '1.3.6' {
# Test-CustomerLockbox.ps1
# Step: Retrieve the organization configuration (Condition C: Pass/Fail) # Step: Retrieve the organization configuration (Condition C: Pass/Fail)
$orgConfig = Get-OrganizationConfig | Select-Object CustomerLockBoxEnabled $orgConfig = Get-OrganizationConfig | Select-Object CustomerLockBoxEnabled
$customerLockboxEnabled = $orgConfig.CustomerLockBoxEnabled $customerLockboxEnabled = $orgConfig.CustomerLockBoxEnabled
# [bool]
return $customerLockboxEnabled return $customerLockboxEnabled
} }
'2.1.1' { '2.1.1' {
# Test-SafeLinksOfficeApps.ps1
if (Get-Command Get-SafeLinksPolicy -ErrorAction SilentlyContinue) { if (Get-Command Get-SafeLinksPolicy -ErrorAction SilentlyContinue) {
# 2.1.1 (L2) Ensure Safe Links for Office Applications is Enabled # 2.1.1 (L2) Ensure Safe Links for Office Applications is Enabled
# Retrieve all Safe Links policies # Retrieve all Safe Links policies
@@ -67,6 +74,7 @@ function Get-ExoOutput {
$misconfiguredDetails += "Policy: $($policy.Name); Failures: $($failures -join ', ')" $misconfiguredDetails += "Policy: $($policy.Name); Failures: $($failures -join ', ')"
} }
} }
# [object[]]
return $misconfiguredDetails return $misconfiguredDetails
} }
else { else {
@@ -74,7 +82,18 @@ function Get-ExoOutput {
} }
} }
'2.1.2' { Write-Output "Matched 2.1.2" } '2.1.2' {
# Test-CommonAttachmentFilter.ps1
# 2.1.2 (L1) Ensure the Common Attachment Types Filter is enabled
# Condition A: The Common Attachment Types Filter is enabled in the Microsoft 365 Security & Compliance Center.
# Condition B: Using Exchange Online PowerShell, verify that the `EnableFileFilter` property of the default malware filter policy is set to `True`.
# Retrieve the attachment filter policy
$attachmentFilter = Get-MalwareFilterPolicy -Identity Default | Select-Object EnableFileFilter
$result = $attachmentFilter.EnableFileFilter
# [bool]
return $result
}
'2.1.3' { Write-Output "Matched 2.1.3" } '2.1.3' { Write-Output "Matched 2.1.3" }
'2.1.4' { Write-Output "Matched 2.1.4" } '2.1.4' { Write-Output "Matched 2.1.4" }
'2.1.5' { Write-Output "Matched 2.1.5" } '2.1.5' { Write-Output "Matched 2.1.5" }