fix: formatting

This commit is contained in:
DrIOS
2024-06-30 12:24:36 -05:00
parent 5804ca25c1
commit e993f186af
10 changed files with 9 additions and 20 deletions

View File

@@ -135,7 +135,6 @@ function Get-CISMSTeamsOutput {
# - Condition A: `AllowAnonymousUsersToJoinMeeting` is not set to `False`.
# - Condition B: Verification using the UI shows that `Anonymous users can join a meeting` is not set to `Off` in the Global meeting policy.
# - Condition C: PowerShell command output indicates that anonymous users are allowed to join meetings.
# Connect to Teams PowerShell using Connect-MicrosoftTeams
# $teamsMeetingPolicy Mock Object
<#

View File

@@ -5,16 +5,14 @@ function Test-BlockChannelEmails {
# Aligned
# Parameters can be added here if needed
)
begin {
# Dot source the class script if necessary
#. .\source\Classes\CISAuditResult.ps1
# Initialization code, if needed
$recnum = "8.1.2"
Write-Verbose "Running Test-BlockChannelEmails for $recnum..."
}
process {
try {
# 8.1.2 (L1) Ensure users can't send emails to a channel email address
#
@@ -31,11 +29,9 @@ function Test-BlockChannelEmails {
# - Condition A: The `AllowEmailIntoChannel` setting in Teams is not set to `False`.
# - Condition B: The setting `Users can send emails to a channel email address` is not set to `Off` in the Teams admin center.
# - Condition C: Verification using PowerShell indicates that the `AllowEmailIntoChannel` setting is enabled.
# Retrieve Teams client configuration
$teamsClientConfig = Get-CISMSTeamsOutput -Rec $recnum
$allowEmailIntoChannel = $teamsClientConfig.AllowEmailIntoChannel
# Prepare failure reasons and details based on compliance
$failureReasons = if ($allowEmailIntoChannel) {
"Emails can be sent to a channel email address" # Condition A Fail: AllowEmailIntoChannel is True
@@ -43,14 +39,12 @@ function Test-BlockChannelEmails {
else {
"N/A" # Condition A Pass: AllowEmailIntoChannel is False
}
$details = if ($allowEmailIntoChannel) {
"AllowEmailIntoChannel is set to True" # Condition B Fail: Emails are allowed
}
else {
"AllowEmailIntoChannel is set to False" # Condition B Pass: Emails are blocked
}
# Create and populate the CISAuditResult object
$params = @{
Rec = $recnum
@@ -66,7 +60,6 @@ function Test-BlockChannelEmails {
$auditResult = Get-TestError -LastError $LastError -recnum $recnum
}
}
end {
# Return the audit result
return $auditResult

View File

@@ -5,16 +5,14 @@ function Test-DialInBypassLobby {
# Aligned
# Parameters can be defined here if needed
)
begin {
# Dot source the class script if necessary
#. .\source\Classes\CISAuditResult.ps1
# Initialization code, if needed
$recnum = "8.5.4"
Write-Verbose "Running Test-DialInBypassLobby for $recnum..."
}
process {
try {
# 8.5.4 (L1) Ensure users dialing in can't bypass the lobby
#
@@ -40,7 +38,6 @@ function Test-DialInBypassLobby {
#>
$CsTeamsMeetingPolicyPSTN = Get-CISMSTeamsOutput -Rec $recnum
$PSTNBypassDisabled = -not $CsTeamsMeetingPolicyPSTN.AllowPSTNUsersToBypassLobby
# Prepare failure reasons and details based on compliance
$failureReasons = if (-not $PSTNBypassDisabled) {
"Users dialing in can bypass the lobby"
@@ -48,14 +45,12 @@ function Test-DialInBypassLobby {
else {
"N/A"
}
$details = if ($PSTNBypassDisabled) {
"AllowPSTNUsersToBypassLobby is set to False"
}
else {
"AllowPSTNUsersToBypassLobby is set to True"
}
# Create and populate the CISAuditResult object
$params = @{
Rec = $recnum
@@ -71,7 +66,6 @@ function Test-DialInBypassLobby {
$auditResult = Get-TestError -LastError $LastError -recnum $recnum
}
}
end {
# Return the audit result
return $auditResult

View File

@@ -10,6 +10,7 @@ function Test-MeetingChatNoAnonymous {
#. .\source\Classes\CISAuditResult.ps1
# Initialization code, if needed
$recnum = "8.5.5"
Write-Verbose "Running Test-MeetingChatNoAnonymous for $recnum..."
}
process {
try {

View File

@@ -10,6 +10,7 @@ function Test-NoAnonymousMeetingJoin {
#. .\source\Classes\CISAuditResult.ps1
# Initialization code, if needed
$recnum = "8.5.1"
Write-Verbose "Running Test-NoAnonymousMeetingJoin for $recnum..."
}
process {
try {

View File

@@ -10,6 +10,7 @@ function Test-NoAnonymousMeetingStart {
#. .\source\Classes\CISAuditResult.ps1
# Initialization code, if needed
$recnum = "8.5.2"
Write-Verbose "Running Test-NoAnonymousMeetingStart for $recnum..."
}
process {
try {

View File

@@ -5,14 +5,13 @@ function Test-OrgOnlyBypassLobby {
# Aligned
# Parameters can be defined here if needed
)
begin {
# Dot source the class script if necessary
#. .\source\Classes\CISAuditResult.ps1
# Initialization code, if needed
$recnum = "8.5.3"
Write-Verbose "Running Test-OrgOnlyBypassLobby for $recnum..."
}
process {
try {
# 8.5.3 (L1) Ensure only people in my org can bypass the lobby

View File

@@ -10,6 +10,7 @@ function Test-OrganizersPresent {
#. .\source\Classes\CISAuditResult.ps1
# Initialization code, if needed
$recnum = "8.5.6"
Write-Verbose "Running Test-OrganizersPresent for $recnum..."
}
process {
try {

View File

@@ -10,6 +10,7 @@ function Test-TeamsExternalAccess {
# . .\source\Classes\CISAuditResult.ps1
# Initialization code, if needed
$recnum = "8.2.1"
Write-Verbose "Running Test-TeamsExternalAccess for $recnum..."
}
process {
try {

View File

@@ -10,18 +10,17 @@ function Test-TeamsExternalFileSharing {
# . .\source\Classes\CISAuditResult.ps1
# Initialization code, if needed
$recnum = "8.1.1"
Write-Verbose "Running Test-TeamsExternalFileSharing for $recnum..."
}
process {
try {
# 8.1.1 (L2) Ensure external file sharing in Teams is enabled for only approved cloud storage services
# Connect to Teams PowerShell using Connect-MicrosoftTeams
# Condition A: The `AllowDropbox` setting is set to `False`.
# Condition B: The `AllowBox` setting is set to `False`.
# Condition C: The `AllowGoogleDrive` setting is set to `False`.
# Condition D: The `AllowShareFile` setting is set to `False`.
# Condition E: The `AllowEgnyte` setting is set to `False`.
# Assuming that 'approvedProviders' is a list of approved cloud storage service names
# This list must be defined according to your organization's approved cloud storage services
# Retrieve the current Teams client configuration