-
Notifications
You must be signed in to change notification settings - Fork 341
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1825 from microsoft/main
Release 9-12-2023
- Loading branch information
Showing
4 changed files
with
46 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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])] | ||
|
@@ -509,4 +550,5 @@ OutOfPolicyProcessing | |
RBADelegateSettings | ||
RBAPostProcessing | ||
VerbosePostProcessing | ||
RBALogSummary | ||
RBAPostScript |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters