add: Get-ExoOutput function and updated tests

This commit is contained in:
DrIOS
2024-06-23 14:28:51 -05:00
parent 90c5b95f35
commit 381b8ebeb8
20 changed files with 239 additions and 79 deletions

View File

@@ -31,12 +31,10 @@ function Test-ModernAuthExchangeOnline {
process {
try {
# Ensuring the ExchangeOnlineManagement module is available
# 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-OrganizationConfig | Select-Object -Property Name, OAuth2ClientProfileEnabled
$orgConfig = Get-ExoOutput -Rec $recnum
# Prepare failure reasons and details based on compliance
$failureReasons = if (-not $orgConfig.OAuth2ClientProfileEnabled) {