diff --git a/Calendar/CalLogHelpers/ExportToExcelFunctions.ps1 b/Calendar/CalLogHelpers/ExportToExcelFunctions.ps1 index 66e566e9c6..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. + # Only need to run once per script execution. 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" @@ -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-CalendarDiagnosticObjectsSummary.ps1 b/Calendar/Get-CalendarDiagnosticObjectsSummary.ps1 index e635b625bd..1eae9aa6b9 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..." } @@ -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 "=" 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..336f24376c 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 Documentation on collecting CalLogs and Analyzing them: + [How to Get Calendar Logs](https://aka.ms/GetCalLogs) + [How to Analyze Calendar Logs](https://aka.ms/AnalyzeCalLogs)