SHELL/8.5.2.ps1
|
$CheckId = "8.5.2" $Title = "Ensure anonymous users and dial-in callers can't start a meeting" $Level = "L1" $BenchmarkType = "Automated" try { $Policy = Get-CsTeamsMeetingPolicy -Identity Global -ErrorAction Stop $AllowAnonymousUsersToStartMeeting = [bool]$Policy.AllowAnonymousUsersToStartMeeting $Pass = -not $AllowAnonymousUsersToStartMeeting $Status = if ($Pass) { "PASS" } else { "FAIL" } [pscustomobject]@{ CheckId = $CheckId Title = $Title Level = $Level BenchmarkType = $BenchmarkType Status = $Status Pass = $Pass Evidence = [pscustomobject]@{ AllowAnonymousUsersToStartMeeting = $AllowAnonymousUsersToStartMeeting SourceDocument = "CIS_Microsoft_365_Foundations_Benchmark_v6.0.1" } Error = if ($Pass) { $null } else { "AllowAnonymousUsersToStartMeeting is True. It must be False." } Timestamp = Get-Date } } catch { [pscustomobject]@{ CheckId = $CheckId Title = $Title Level = $Level BenchmarkType = $BenchmarkType Status = "ERROR" Pass = $null Evidence = [pscustomobject]@{ SourceDocument = "CIS_Microsoft_365_Foundations_Benchmark_v6.0.1" } Error = $_.Exception.Message Timestamp = Get-Date } } |