File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -212,11 +212,11 @@ function Test-Assessment-41035 {
212212 $chatResult = if ($policy.ReportChatMessageEnabled -eq $true ) { ' ✅ Pass' } else { ' ❌ Fail' }
213213 $postResult = if ($policy.PostSubmitMessageEnabled -eq $true ) { ' ✅ Pass' } else { ' ⚠️ Investigate' }
214214
215- # Rule state and SentTo — Investigate when customMailboxComplete but rule does not deliver
216- $ruleStateName = if ($null -eq $rule ) { ' —' } else { " `` $ ( $rule.State ) `` " }
217- $ruleStateResult = if ($customMailboxRuleProblem ) { ' ⚠️ Investigate ' } elseif ($null -eq $rule ) { ' ❌ Fail ' } elseif ($rule.State -eq ' Enabled' ) { ' ✅ Pass' } else { ' ⚠️ Investigate' }
218- $ruleSentTo = if ($null -eq $rule -or [string ]::IsNullOrWhiteSpace($rule.SentTo )) { ' —' } else { Get-SafeMarkdown - Text $rule.SentTo }
219- $ruleSentToResult = if ($ ruleDelivers ) { ' ✅ Pass' } elseif ($customMailboxRuleProblem ) { ' ⚠️ Investigate' } else { ' ❌ Fail ' }
215+ # Rule state and SentTo — only applicable when the custom mailbox address lists are fully configured.
216+ $ruleStateName = if (-not $customMailboxComplete -or $null -eq $rule ) { ' —' } else { " `` $ ( $rule.State ) `` " }
217+ $ruleStateResult = if (-not $customMailboxComplete ) { ' — ' } elseif ($customMailboxRuleProblem ) { ' ⚠️ Investigate ' } elseif ($rule.State -eq ' Enabled' ) { ' ✅ Pass' } else { ' ⚠️ Investigate' }
218+ $ruleSentTo = if (-not $customMailboxComplete -or $null -eq $rule -or [string ]::IsNullOrWhiteSpace($rule.SentTo )) { ' —' } else { Get-SafeMarkdown - Text $rule.SentTo }
219+ $ruleSentToResult = if (-not $customMailboxComplete ) { ' — ' } elseif ( $ ruleDelivers ) { ' ✅ Pass' } elseif ($customMailboxRuleProblem ) { ' ⚠️ Investigate' } else { ' ⚠️ Investigate ' }
220220
221221 $tableRows = ' '
222222 $tableRows += " | EnableReportToMicrosoft | $ ( & $formatBool $policy.EnableReportToMicrosoft ) | True (re-evaluation + model training) | $msResult |`n "
You can’t perform that action at this time.
0 commit comments