format: update recnum to RecNum
This commit is contained in:
@@ -23,14 +23,14 @@ function Test-ModernAuthExchangeOnline {
|
||||
# - Condition A: Modern authentication for Exchange Online is not enabled.
|
||||
# - Condition B: Exchange Online clients do not use modern authentication to log in to Microsoft 365 mailboxes.
|
||||
# - Condition C: Users of older email clients, such as Outlook 2013 and Outlook 2016, are still able to authenticate to Exchange using Basic Authentication.
|
||||
$recnum = "6.5.1"
|
||||
Write-Verbose "Running Test-ModernAuthExchangeOnline for $recnum..."
|
||||
$RecNum = "6.5.1"
|
||||
Write-Verbose "Running Test-ModernAuthExchangeOnline for $RecNum..."
|
||||
}
|
||||
process {
|
||||
try {
|
||||
# 6.5.1 (L1) Ensure modern authentication for Exchange Online is enabled
|
||||
# Check modern authentication setting in Exchange Online configuration (Condition A and B)
|
||||
$orgConfig = Get-CISExoOutput -Rec $recnum
|
||||
$orgConfig = Get-CISExoOutput -Rec $RecNum
|
||||
# Prepare failure reasons and details based on compliance
|
||||
$failureReasons = if (-not $orgConfig.OAuth2ClientProfileEnabled) {
|
||||
"Modern authentication is disabled"
|
||||
@@ -42,7 +42,7 @@ function Test-ModernAuthExchangeOnline {
|
||||
$details = "OAuth2ClientProfileEnabled: $($orgConfig.OAuth2ClientProfileEnabled) for Organization: $($orgConfig.Name)"
|
||||
# Create and populate the CISAuditResult object
|
||||
$params = @{
|
||||
Rec = $recnum
|
||||
Rec = $RecNum
|
||||
Result = $orgConfig.OAuth2ClientProfileEnabled
|
||||
Status = if ($orgConfig.OAuth2ClientProfileEnabled) { "Pass" } else { "Fail" }
|
||||
Details = $details
|
||||
@@ -52,7 +52,7 @@ function Test-ModernAuthExchangeOnline {
|
||||
}
|
||||
catch {
|
||||
$LastError = $_
|
||||
$auditResult = Get-TestError -LastError $LastError -recnum $recnum
|
||||
$auditResult = Get-TestError -LastError $LastError -RecNum $RecNum
|
||||
}
|
||||
}
|
||||
end {
|
||||
|
||||
Reference in New Issue
Block a user