fix: 1.3.6 simplified output and added object comment
This commit is contained in:
@@ -52,7 +52,7 @@ function Get-CISExoOutput {
|
|||||||
# Test-BlockSharedMailboxSignIn.ps1
|
# Test-BlockSharedMailboxSignIn.ps1
|
||||||
$MBX = Get-EXOMailbox -RecipientTypeDetails SharedMailbox
|
$MBX = Get-EXOMailbox -RecipientTypeDetails SharedMailbox
|
||||||
# [object[]]
|
# [object[]]
|
||||||
# $MBX example output:
|
# $MBX mock object:
|
||||||
<#
|
<#
|
||||||
$MBX = @(
|
$MBX = @(
|
||||||
[PSCustomObject]@{
|
[PSCustomObject]@{
|
||||||
@@ -88,7 +88,7 @@ function Get-CISExoOutput {
|
|||||||
return $sharingPolicies
|
return $sharingPolicies
|
||||||
}
|
}
|
||||||
'1.3.3b' {
|
'1.3.3b' {
|
||||||
$mailboxes = Get-Mailbox -ResultSize Unlimited
|
# $mailboxes Mock Object
|
||||||
<#
|
<#
|
||||||
$mailboxes = @(
|
$mailboxes = @(
|
||||||
[PSCustomObject]@{
|
[PSCustomObject]@{
|
||||||
@@ -114,6 +114,7 @@ function Get-CISExoOutput {
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
#>
|
#>
|
||||||
|
$mailboxes = Get-Mailbox -ResultSize Unlimited
|
||||||
$results = foreach ($mailbox in $mailboxes) {
|
$results = foreach ($mailbox in $mailboxes) {
|
||||||
# Get the name of the default calendar folder (depends on the mailbox's language)
|
# Get the name of the default calendar folder (depends on the mailbox's language)
|
||||||
# Return single string Ex: return "Calendar" x 3 in array
|
# Return single string Ex: return "Calendar" x 3 in array
|
||||||
@@ -143,6 +144,13 @@ function Get-CISExoOutput {
|
|||||||
'1.3.6' {
|
'1.3.6' {
|
||||||
# Test-CustomerLockbox.ps1
|
# Test-CustomerLockbox.ps1
|
||||||
# Step: Retrieve the organization configuration (Condition C: Pass/Fail)
|
# Step: Retrieve the organization configuration (Condition C: Pass/Fail)
|
||||||
|
# $orgConfig Mock Object:
|
||||||
|
<#
|
||||||
|
# return $orgConfig
|
||||||
|
$orgConfig = [PSCustomObject]@{
|
||||||
|
CustomerLockBoxEnabled = $true
|
||||||
|
}
|
||||||
|
#>
|
||||||
$orgConfig = Get-OrganizationConfig | Select-Object CustomerLockBoxEnabled
|
$orgConfig = Get-OrganizationConfig | Select-Object CustomerLockBoxEnabled
|
||||||
$customerLockboxEnabled = $orgConfig.CustomerLockBoxEnabled
|
$customerLockboxEnabled = $orgConfig.CustomerLockBoxEnabled
|
||||||
# [bool]
|
# [bool]
|
||||||
|
@@ -12,7 +12,7 @@ function Test-CustomerLockbox {
|
|||||||
|
|
||||||
# Initialization code, if needed
|
# Initialization code, if needed
|
||||||
$recnum = "1.3.6"
|
$recnum = "1.3.6"
|
||||||
|
Write-Verbose "Running Test-CustomerLockbox for $recnum..."
|
||||||
# Conditions for 1.3.6 (L2) Ensure the customer lockbox feature is enabled (Automated)
|
# Conditions for 1.3.6 (L2) Ensure the customer lockbox feature is enabled (Automated)
|
||||||
#
|
#
|
||||||
# Validate test for a pass:
|
# Validate test for a pass:
|
||||||
@@ -33,8 +33,9 @@ function Test-CustomerLockbox {
|
|||||||
process {
|
process {
|
||||||
try {
|
try {
|
||||||
# Step: Retrieve the organization configuration (Condition C: Pass/Fail)
|
# Step: Retrieve the organization configuration (Condition C: Pass/Fail)
|
||||||
|
# $customerLockboxEnabled Mock Object
|
||||||
|
# $customerLockboxEnabled = $true
|
||||||
$customerLockboxEnabled = Get-CISExoOutput -Rec $recnum
|
$customerLockboxEnabled = Get-CISExoOutput -Rec $recnum
|
||||||
|
|
||||||
# Step: Prepare failure reasons and details based on compliance (Condition A, B, & C: Fail)
|
# Step: Prepare failure reasons and details based on compliance (Condition A, B, & C: Fail)
|
||||||
$failureReasons = if (-not $customerLockboxEnabled) {
|
$failureReasons = if (-not $customerLockboxEnabled) {
|
||||||
"Customer lockbox feature is not enabled."
|
"Customer lockbox feature is not enabled."
|
||||||
|
Reference in New Issue
Block a user