From 2f0bfc37512971cf5fe5d865bd1ce5b2b2c0b758 Mon Sep 17 00:00:00 2001 From: Shane Ferrell Date: Fri, 4 Oct 2024 14:19:39 -0700 Subject: [PATCH 1/6] Update RBA based of feedback --- Calendar/CalLogHelpers/ExportToExcelFunctions.ps1 | 2 +- Calendar/Get-RBASummary.ps1 | 6 +++--- docs/Calendar/Get-CalendarDiagnosticObjectsSummary.md | 4 ++++ 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Calendar/CalLogHelpers/ExportToExcelFunctions.ps1 b/Calendar/CalLogHelpers/ExportToExcelFunctions.ps1 index 66e566e9c6..214c85e8f8 100644 --- a/Calendar/CalLogHelpers/ExportToExcelFunctions.ps1 +++ b/Calendar/CalLogHelpers/ExportToExcelFunctions.ps1 @@ -58,7 +58,7 @@ function LogScriptInfo { $RunInfo | Export-Excel -Path $FileName -WorksheetName "Script Info" -MoveToEnd $script:CollectedCmdLine = $true } - # If someone runs the script the script again logs will update, but ScriptInfo done not update. Need to add new table for each run. + # If someone runs the script the script again logs will update, but ScriptInfo does not update. Need to add new table for each run. } function Export-TimelineExcel { diff --git a/Calendar/Get-RBASummary.ps1 b/Calendar/Get-RBASummary.ps1 index ce26bea7b0..c05c8d4d5d 100644 --- a/Calendar/Get-RBASummary.ps1 +++ b/Calendar/Get-RBASummary.ps1 @@ -532,9 +532,8 @@ function RBALogSummary { $RBALog = ((Export-MailboxDiagnosticLogs $Identity -ComponentName RBA).MailboxLog -split "`\n`\r").Trim() - Write-Host "`tFound $($RBALog.count) RBA Log entries in RBALog. Summarizing Accepts, Declines, and Tentative meetings." - if ($RBALog.count -gt 1) { + Write-Host "`tFound $($RBALog.count) RBA Log entries in RBALog. Summarizing Accepts, Declines, and Tentative meetings." $Starts = $RBALog | Select-String -Pattern "START -" $FirstDate = "[Unknown]" $LastDate = "[Unknown]" @@ -626,6 +625,8 @@ function RBALogSummary { Write-Host -ForegroundColor Cyan $Filename -NoNewline Write-Host "] in the current directory." $RBALog | Out-File $Filename + + RBAPostScript } 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." } @@ -768,5 +769,4 @@ RBADelegateSettings RBAPostProcessing VerbosePostProcessing RBALogSummary -RBAPostScript Stop-Transcript diff --git a/docs/Calendar/Get-CalendarDiagnosticObjectsSummary.md b/docs/Calendar/Get-CalendarDiagnosticObjectsSummary.md index b2934e82d3..0934173355 100644 --- a/docs/Calendar/Get-CalendarDiagnosticObjectsSummary.md +++ b/docs/Calendar/Get-CalendarDiagnosticObjectsSummary.md @@ -48,3 +48,7 @@ Get-CalendarDiagnosticObjectsSummary.ps1 -Identity $Users -MeetingID $MeetingID ``` Will create file like `.\123456_CalLogSummary_.xlsx` in current directory. + +More Documenation on collecting CalLogs and Analyzing them: +https://learn.microsoft.com/en-us/exchange/troubleshoot/calendars/get-calendar-diagnostic-logs +https://learn.microsoft.com/en-us/exchange/troubleshoot/calendars/analyze-calendar-diagnostic-logs \ No newline at end of file From 90d2d42e6c48566f38216201ee798e6c999585e1 Mon Sep 17 00:00:00 2001 From: Shane Ferrell Date: Mon, 7 Oct 2024 15:49:01 -0700 Subject: [PATCH 2/6] Fix for Script Versions --- Calendar/CalLogHelpers/ExportToExcelFunctions.ps1 | 4 ++-- Calendar/Get-CalendarDiagnosticObjectsSummary.ps1 | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Calendar/CalLogHelpers/ExportToExcelFunctions.ps1 b/Calendar/CalLogHelpers/ExportToExcelFunctions.ps1 index 214c85e8f8..20e6f23b0f 100644 --- a/Calendar/CalLogHelpers/ExportToExcelFunctions.ps1 +++ b/Calendar/CalLogHelpers/ExportToExcelFunctions.ps1 @@ -19,7 +19,7 @@ function Export-CalLogExcel { } function LogScriptInfo { - # Only need to run once per script. + # Only need to run once per script exicution. if ($null -eq $script:CollectedCmdLine) { $RunInfo = @() $RunInfo += [PSCustomObject]@{ @@ -36,7 +36,7 @@ function LogScriptInfo { } $RunInfo += [PSCustomObject]@{ Key = "Script Version" - Value = $script:Version + Value = $script:BuildVersion } $RunInfo += [PSCustomObject]@{ Key = "User" diff --git a/Calendar/Get-CalendarDiagnosticObjectsSummary.ps1 b/Calendar/Get-CalendarDiagnosticObjectsSummary.ps1 index e635b625bd..b12016347e 100644 --- a/Calendar/Get-CalendarDiagnosticObjectsSummary.ps1 +++ b/Calendar/Get-CalendarDiagnosticObjectsSummary.ps1 @@ -83,11 +83,11 @@ if (Test-ScriptVersion -AutoUpdate -VersionsUrl "https://aka.ms/CL-VersionsUrl" } $script:command = $MyInvocation -Write-Host -ForegroundColor Blue "The script was started with the following command line:" -Write-Host -ForegroundColor Blue "Name:" $command.MyCommand.name -Write-Host -ForegroundColor Blue "Command Line:" $command.line - -Write-Verbose "Script Versions: $BuildVersion" +Write-Verbose "The script was started with the following command line:" +Write-Verbose "Name: " $command.MyCommand.name +Write-Verbose "Command Line: " $command.line +Write-Verbose "Script Version: $BuildVersion" +$script:BuildVersion = $BuildVersion # =================================================================================================== # Support scripts @@ -168,7 +168,7 @@ if (-not ([string]::IsNullOrEmpty($Subject)) ) { $ExceptionLogs = $LogToExamine | ForEach-Object { $logLeftCount -= 1 Write-Verbose "Getting Exception Logs for [$($_.ItemId.ObjectId)]" - Get-CalendarDiagnosticObjects -Identity $ID -ItemIds $_.ItemId.ObjectId -ShouldFetchRecurrenceExceptions $true -CustomPropertyNames $CustomPropertyNameList + Get-CalendarDiagnosticObjects -Identity $ID -ItemIds $_.ItemId.ObjectId -ShouldFetchRecurrenceExceptions $true -CustomPropertyNames $CustomPropertyNameList -ShouldBindToItem $true if ($logLeftCount % 20 -eq 0) { Write-Host -ForegroundColor Cyan "`t [$($logLeftCount)] logs left to examine..." } From f4818dd45b7beb6bd86f9ded161ea65150f49179 Mon Sep 17 00:00:00 2001 From: Shane Ferrell Date: Mon, 7 Oct 2024 15:56:07 -0700 Subject: [PATCH 3/6] Not a PR without Spelling Mistakes --- Calendar/CalLogHelpers/ExportToExcelFunctions.ps1 | 2 +- docs/Calendar/Get-CalendarDiagnosticObjectsSummary.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Calendar/CalLogHelpers/ExportToExcelFunctions.ps1 b/Calendar/CalLogHelpers/ExportToExcelFunctions.ps1 index 20e6f23b0f..af442f5f6e 100644 --- a/Calendar/CalLogHelpers/ExportToExcelFunctions.ps1 +++ b/Calendar/CalLogHelpers/ExportToExcelFunctions.ps1 @@ -19,7 +19,7 @@ function Export-CalLogExcel { } function LogScriptInfo { - # Only need to run once per script exicution. + # Only need to run once per script execution. if ($null -eq $script:CollectedCmdLine) { $RunInfo = @() $RunInfo += [PSCustomObject]@{ diff --git a/docs/Calendar/Get-CalendarDiagnosticObjectsSummary.md b/docs/Calendar/Get-CalendarDiagnosticObjectsSummary.md index 0934173355..317f1ef621 100644 --- a/docs/Calendar/Get-CalendarDiagnosticObjectsSummary.md +++ b/docs/Calendar/Get-CalendarDiagnosticObjectsSummary.md @@ -49,6 +49,6 @@ Get-CalendarDiagnosticObjectsSummary.ps1 -Identity $Users -MeetingID $MeetingID Will create file like `.\123456_CalLogSummary_.xlsx` in current directory. -More Documenation on collecting CalLogs and Analyzing them: +More Documentation on collecting CalLogs and Analyzing them: https://learn.microsoft.com/en-us/exchange/troubleshoot/calendars/get-calendar-diagnostic-logs -https://learn.microsoft.com/en-us/exchange/troubleshoot/calendars/analyze-calendar-diagnostic-logs \ No newline at end of file +https://learn.microsoft.com/en-us/exchange/troubleshoot/calendars/analyze-calendar-diagnostic-logs From f3a89837d2ddc9a78e2bd2b203a77e5d56bbcf5d Mon Sep 17 00:00:00 2001 From: Shane Ferrell Date: Tue, 15 Oct 2024 11:19:42 -0700 Subject: [PATCH 4/6] Add AKA links --- Calendar/Get-CalendarDiagnosticObjectsSummary.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Calendar/Get-CalendarDiagnosticObjectsSummary.ps1 b/Calendar/Get-CalendarDiagnosticObjectsSummary.ps1 index b12016347e..1eae9aa6b9 100644 --- a/Calendar/Get-CalendarDiagnosticObjectsSummary.ps1 +++ b/Calendar/Get-CalendarDiagnosticObjectsSummary.ps1 @@ -196,8 +196,8 @@ if (-not ([string]::IsNullOrEmpty($Subject)) ) { } Write-DashLineBoxColor "Hope this script was helpful in getting and understanding the Calendar Logs.", -"More Info on Getting the logs: https://learn.microsoft.com/en-us/exchange/troubleshoot/calendars/get-calendar-diagnostic-logs", -"and on Analyzing the logs: https://learn.microsoft.com/en-us/exchange/troubleshoot/calendars/analyze-calendar-diagnostic-logs", +"More Info on Getting the logs: https://aka.ms/GetCalLogs", +"and on Analyzing the logs: https://aka.ms/AnalyzeCalLogs", "If you have issues or suggestion for this script, please send them to: ", "`t CalLogFormatterDevs@microsoft.com" -Color Yellow -DashChar "=" From 21d09101bdde9859e57fab6ec143394130ce558f Mon Sep 17 00:00:00 2001 From: Shane Ferrell Date: Tue, 15 Oct 2024 11:53:53 -0700 Subject: [PATCH 5/6] Update Doc's Too --- docs/Calendar/Get-CalendarDiagnosticObjectsSummary.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/Calendar/Get-CalendarDiagnosticObjectsSummary.md b/docs/Calendar/Get-CalendarDiagnosticObjectsSummary.md index 317f1ef621..0364b7b284 100644 --- a/docs/Calendar/Get-CalendarDiagnosticObjectsSummary.md +++ b/docs/Calendar/Get-CalendarDiagnosticObjectsSummary.md @@ -50,5 +50,5 @@ Will create file like `.\123456_CalLogSummary_.xlsx` in current dire More Documentation on collecting CalLogs and Analyzing them: -https://learn.microsoft.com/en-us/exchange/troubleshoot/calendars/get-calendar-diagnostic-logs -https://learn.microsoft.com/en-us/exchange/troubleshoot/calendars/analyze-calendar-diagnostic-logs + [How to Get Calendar Logs](https://aka.ms/GetCalLogs) + [How to Analyse Calendar Logs](https://aka.ms/AnalyzeCalLogs) \ No newline at end of file From b328076ad3c66c2e06711733c21be9a4616c3ab1 Mon Sep 17 00:00:00 2001 From: Shane Ferrell Date: Mon, 21 Oct 2024 10:56:02 -0700 Subject: [PATCH 6/6] Analyse -> Analyze --- docs/Calendar/Get-CalendarDiagnosticObjectsSummary.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Calendar/Get-CalendarDiagnosticObjectsSummary.md b/docs/Calendar/Get-CalendarDiagnosticObjectsSummary.md index 0364b7b284..336f24376c 100644 --- a/docs/Calendar/Get-CalendarDiagnosticObjectsSummary.md +++ b/docs/Calendar/Get-CalendarDiagnosticObjectsSummary.md @@ -51,4 +51,4 @@ Will create file like `.\123456_CalLogSummary_.xlsx` in current dire More Documentation on collecting CalLogs and Analyzing them: [How to Get Calendar Logs](https://aka.ms/GetCalLogs) - [How to Analyse Calendar Logs](https://aka.ms/AnalyzeCalLogs) \ No newline at end of file + [How to Analyze Calendar Logs](https://aka.ms/AnalyzeCalLogs)