Skip to content

Commit

Permalink
Merge pull request #1825 from microsoft/main
Browse files Browse the repository at this point in the history
Release 9-12-2023
  • Loading branch information
dpaulson45 authored Sep 12, 2023
2 parents 6f2a5f2 + 770706b commit 2f344c8
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 4 deletions.
42 changes: 42 additions & 0 deletions Calendar/Get-RBASummary.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,47 @@ function RBAPostScript {
send mail to [email protected]";
}

function RBALogSummary {
Write-DashLineBoxColor @("RBA Log Summary") -Color blue -DashChar =

$RBALog = (Export-MailboxDiagnosticLogs $Identity -ComponentName RBA).MailboxLog -split "`\n"

if ($RBALog.count -gt 1) {
$Starts = $RBALog | Select-String -Pattern "START -"

if ($starts.count -gt 1) {
$LastDate = ($Starts[0] -Split ",")[0].Trim()
$FirstDate = ($starts[$($Starts.count) -1 ] -Split ",")[0].Trim();
Write-Host "The RBA Log for $Identity shows the following:"
Write-Host "`t $($starts.count) Processed events times between $FirstDate and $LastDate"
}

$AcceptLogs = $RBALog | Select-String -Pattern "Action:Accept"
$DeclineLogs = $RBALog | Select-String -Pattern "Action:Decline"
$TentativeLogs = $RBALog | Select-String -Pattern "Action:Tentative"

if ($AcceptLogs.count -ne 0) {
$LastAccept = ($AcceptLogs[0] -Split ",")[0].Trim()
Write-Host "`t $($AcceptLogs.count) were Accepted between $FirstDate and $LastDate"
Write-Host "`t`t with the last meeting Accepted on $LastAccept"
}

if ($TentativeLogs.count -ne 0) {
$LastTentative = ($TentativeLogs[0] -Split ",")[0].Trim()
Write-Host "`t $($TentativeLogs.count) Tentatively Accepted meetings between $FirstDate and $LastDate"
Write-Host "`t`t with the last meeting Tentatively Accepted on $LastTentative"
}

if ($DeclineLogs.count -ne 0) {
$LastDecline = ($DeclineLogs[0] -Split ",")[0].Trim()
Write-Host "`t $($DeclineLogs.count) Declined meetings between $FirstDate and $LastDate"
Write-Host "`t`t with the last meeting Declined on $LastDecline"
}
} else {
Write-Warning "No RBA Logs found. Send a test meeting invite to the room and try again if this is a newly created room mailbox."
}
}

function Get-DashLine {
[CmdletBinding()]
[OutputType([string])]
Expand Down Expand Up @@ -509,4 +550,5 @@ OutOfPolicyProcessing
RBADelegateSettings
RBAPostProcessing
VerbosePostProcessing
RBALogSummary
RBAPostScript
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ function Invoke-AnalyzerSecurityCveCheck {
"Feb23SU" = (@(NewCveEntry @("CVE-2023-21529", "CVE-2023-21706", "CVE-2023-21707") $ex131619) + (NewCveEntry "CVE-2023-21710" @($ex2016, $ex2019)))
"Mar23SU" = (@(NewCveEntry ("CVE-2023-21707") $ex131619))
"Jun23SU" = (NewCveEntry @("CVE-2023-28310", "CVE-2023-32031") @($ex2016, $ex2019))
"Aug23SU" = (NewCveEntry @("CVE-2023-38181", "CVE-2023-38182", "CVE-2023-38185", "CVE-2023-35368", "CVE-2023-35388") @($ex2016, $ex2019))
"Aug23SU" = (NewCveEntry @("CVE-2023-38181", "CVE-2023-38182", "CVE-2023-38185", "CVE-2023-35368", "CVE-2023-35388", "CVE-2023-36777", "CVE-2023-36757", "CVE-2023-36756", "CVE-2023-36745", "CVE-2023-36744") @($ex2016, $ex2019))
}

# Need to organize the list so oldest CVEs come out first.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,11 +139,11 @@ Describe "Testing Health Checker by Mock Data Imports - Exchange 2016" {

$cveTests = GetObject "Security Vulnerability"
$cveTests.Contains("CVE-2020-1147") | Should -Be $true
$cveTests.Count | Should -Be 39
$cveTests.Count | Should -Be 44
$downloadDomains = GetObject "CVE-2021-1730"
$downloadDomains.DownloadDomainsEnabled | Should -Be "false"

$Script:ActiveGrouping.Count | Should -Be 46
$Script:ActiveGrouping.Count | Should -Be 51
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ Describe "Testing Health Checker by Mock Data Imports" {

$cveTests = GetObject "Security Vulnerability"
$cveTests.Contains("CVE-2020-1147") | Should -Be $true
$cveTests.Count | Should -Be 39
$cveTests.Count | Should -Be 44
$downloadDomains = GetObject "CVE-2021-1730"
$downloadDomains.DownloadDomainsEnabled | Should -Be "False"
TestObjectMatch "Extended Protection Vulnerable" "True" -WriteType "Red"
Expand Down

0 comments on commit 2f344c8

Please sign in to comment.