add: Get-CISMSTeamsOutput function and updated respective tests

This commit is contained in:
DrIOS
2024-06-23 15:27:25 -05:00
parent a874836b8b
commit 917833b186
12 changed files with 283 additions and 39 deletions

View File

@@ -10,8 +10,6 @@ function Test-TeamsExternalAccess {
# Dot source the class script if necessary
# . .\source\Classes\CISAuditResult.ps1
# Initialization code, if needed
$auditResult = [CISAuditResult]::new()
$recnum = "8.2.1"
}
@@ -35,7 +33,7 @@ function Test-TeamsExternalAccess {
# Connect to Teams PowerShell using Connect-MicrosoftTeams
$externalAccessConfig = Get-CsTenantFederationConfiguration
$externalAccessConfig = Get-CISMSTeamsOutput -Rec $recnum
$allowedDomainsLimited = $false
if ($externalAccessConfig.AllowFederatedUsers -and $externalAccessConfig.AllowedDomains -and $externalAccessConfig.AllowedDomains.AllowedDomain.Count -gt 0) {