diff --git a/Calendar/CalLogHelpers/CalLogCSVFunctions.ps1 b/Calendar/CalLogHelpers/CalLogCSVFunctions.ps1 index 10b10d8e6..457eec2cd 100644 --- a/Calendar/CalLogHelpers/CalLogCSVFunctions.ps1 +++ b/Calendar/CalLogHelpers/CalLogCSVFunctions.ps1 @@ -179,7 +179,6 @@ function BuildCSV { 'OriginalLogFolder' = $CalLog.OriginalParentDisplayName 'SharedFolderName' = MapSharedFolder($CalLog.ExternalSharingMasterId) 'IsFromSharedCalendar' = $IsFromSharedCalendar - 'ExternalSharingMasterId' = $CalLog.ExternalSharingMasterId 'ReceivedBy' = $CalLog.ReceivedBy.SmtpEmailAddress 'ReceivedRepresenting' = $CalLog.ReceivedRepresenting.SmtpEmailAddress 'MeetingRequestType' = $CalLog.MeetingRequestType.ToString() @@ -205,7 +204,6 @@ function BuildCSV { 'SendMeetingMessagesDiagnostics' = $CalLog.SendMeetingMessagesDiagnostics 'AttendeeCollection' = MultiLineFormat($CalLog.AttendeeCollection) 'CalendarLogRequestId' = $CalLog.CalendarLogRequestId.ToString() # Move to front.../ Format in groups??? - 'CleanGlobalObjectId' = $CalLog.CleanGlobalObjectId } } $script:EnhancedCalLogs = $GCDOResults diff --git a/Calendar/CalLogHelpers/CalLogInfoFunctions.ps1 b/Calendar/CalLogHelpers/CalLogInfoFunctions.ps1 index fccfcd689..33f7eeac9 100644 --- a/Calendar/CalLogHelpers/CalLogInfoFunctions.ps1 +++ b/Calendar/CalLogHelpers/CalLogInfoFunctions.ps1 @@ -116,7 +116,7 @@ function SetLogType { $ShortClientName -eq "CalendarReplication" -or $CalendarItemTypes.($CalLog.ItemClass) -eq "SharingCFM" -or $CalendarItemTypes.($CalLog.ItemClass) -eq "SharingDelete") { - return "Sharing" + return "Sync" } elseif ($ShortClientName -eq "Other EBA" -or $ShortClientName -eq "Other TBA" -or $ShortClientName -eq "LocationProcessor" -or @@ -129,6 +129,7 @@ function SetLogType { return "Exception" } elseif (($CalendarItemTypes.($CalLog.ItemClass) -like "*Resp*" -and $CalLog.CalendarLogTriggerAction -ne "Create" ) -or $CalendarItemTypes.($CalLog.ItemClass) -eq "AttendeeList" -or + ($CalendarItemTypes.($CalLog.ItemClass) -eq "Forward.Notification" -and ($CalLog.CalendarLogTriggerAction -eq "SoftDelete") -or $CalLog.CalendarLogTriggerAction -like "*move*") -or ($CalLog.ItemClass -eq "IPM.Schedule.Meeting.Request" -and $CalLog.CalendarLogTriggerAction -like "*move*" ) ) { return "Cleanup" } else { diff --git a/Calendar/CalLogHelpers/ExportToExcelFunctions.ps1 b/Calendar/CalLogHelpers/ExportToExcelFunctions.ps1 index b7153135a..a818d0da5 100644 --- a/Calendar/CalLogHelpers/ExportToExcelFunctions.ps1 +++ b/Calendar/CalLogHelpers/ExportToExcelFunctions.ps1 @@ -62,16 +62,19 @@ $ConditionalFormatting = $( # Client, ShortClientInfoString and LogClientInfoString New-ConditionalText "Outlook" -ConditionalTextColor Green -BackgroundColor $null New-ConditionalText "OWA" -ConditionalTextColor DarkGreen -BackgroundColor $null + New-ConditionalText "Teams" -ConditionalTextColor DarkGreen -BackgroundColor $null New-ConditionalText "Transport" -ConditionalTextColor Blue -BackgroundColor $null New-ConditionalText "Repair" -ConditionalTextColor DarkRed -BackgroundColor LightPink New-ConditionalText "Other ?BA" -ConditionalTextColor Orange -BackgroundColor $null + New-ConditionalText "TimeService" -ConditionalTextColor Orange -BackgroundColor $null New-ConditionalText "Other REST" -ConditionalTextColor DarkRed -BackgroundColor $null + New-ConditionalText "[Unknown Rest Client]" -ConditionalTextColor DarkRed -BackgroundColor $null New-ConditionalText "ResourceBookingAssistant" -ConditionalTextColor Blue -BackgroundColor $null #LogType New-ConditionalText -Range "C3:C9999" -ConditionalType ContainsText -Text "Ignorable" -ConditionalTextColor DarkRed -BackgroundColor $null New-ConditionalText -Range "C:C" -ConditionalType ContainsText -Text "Cleanup" -ConditionalTextColor DarkRed -BackgroundColor $null - New-ConditionalText -Range "C:C" -ConditionalType ContainsText -Text "Sharing" -ConditionalTextColor Blue -BackgroundColor $null + New-ConditionalText -Range "C:C" -ConditionalType ContainsText -Text "Sync" -ConditionalTextColor Blue -BackgroundColor $null # TriggerAction New-ConditionalText -Range "G:G" -ConditionalType ContainsText -Text "Create" -ConditionalTextColor Green -BackgroundColor $null @@ -90,17 +93,16 @@ $ConditionalFormatting = $( #Shared Calendar information New-ConditionalText -Range "Q3:Q9999" -ConditionalType NotEqual -Text "Not Shared" -ConditionalTextColor Blue -BackgroundColor $null - New-ConditionalText -Range "R:R" -ConditionalType ContainsText -Text "TRUE" -ConditionalTextColor Blue -BackgroundColor $null - New-ConditionalText -Range "S:S" -ConditionalType NotEqual -Text "NotFound" -ConditionalTextColor Blue -BackgroundColor $null #MeetingRequestType - New-ConditionalText -Range "V:V" -ConditionalType ContainsText -Text "Outdated" -ConditionalTextColor DarkRed -BackgroundColor LightPink + New-ConditionalText -Range "T:T" -ConditionalType ContainsText -Text "Outdated" -ConditionalTextColor DarkRed -BackgroundColor LightPink #AppointmentAuxiliaryFlags - New-ConditionalText -Range "AE3:AE9999" -ConditionalType ContainsText -Text "Copied" -ConditionalTextColor DarkRed -BackgroundColor LightPink + New-ConditionalText -Range "AC3:AC9999" -ConditionalType ContainsText -Text "Copied" -ConditionalTextColor DarkRed -BackgroundColor LightPink + New-ConditionalText -Range "AC3:AC9999" -ConditionalType ContainsText -Text "ForwardedAppointment" -ConditionalTextColor DarkRed -BackgroundColor $null #ResponseType - New-ConditionalText -Range "AI3:AI9999" -ConditionalType ContainsText -Text "Organizer" -ConditionalTextColor Orange -BackgroundColor $null + New-ConditionalText -Range "AG3:AG9999" -ConditionalType ContainsText -Text "Organizer" -ConditionalTextColor Orange -BackgroundColor $null ) function FormatHeader { @@ -146,10 +148,6 @@ function FormatHeader { Set-CellComment -Text "OriginalLogFolder (OriginalParentDisplayName): The Original Log Folder that the item was in / delivered to." -Row $HeaderRow -ColumnNumber $n -Worksheet $sheet $sheet.Column(++$n) | Set-ExcelRange -Width 15 -HorizontalAlignment Right # SharedFolderName Set-CellComment -Text "SharedFolderName: Was this from a Modern Sharing, and if so what Folder." -Row $HeaderRow -ColumnNumber $n -Worksheet $sheet - $sheet.Column(++$n) | Set-ExcelRange -Width 10 -HorizontalAlignment center # IsFromSharedCalendar - Set-CellComment -Text "IsFromSharedCalendar: Is this CalLog from a Modern Sharing relationship?" -Row $HeaderRow -ColumnNumber $n -Worksheet $sheet - $sheet.Column(++$n) | Set-ExcelRange -Width 20 -HorizontalAlignment Left # ExternalSharingMasterId - Set-CellComment -Text "ExternalSharingMasterId: If this is not [NotFound], then it is from a Modern Sharing relationship." -Row $HeaderRow -ColumnNumber $n -Worksheet $sheet $sheet.Column(++$n) | Set-ExcelRange -Width 10 -HorizontalAlignment Left # ReceivedBy Set-CellComment -Text "ReceivedBy: The Receiver of the Calendar Item. Should always be the owner of the Mailbox." -Row $HeaderRow -ColumnNumber $n -Worksheet $sheet $sheet.Column(++$n) | Set-ExcelRange -Width 10 -HorizontalAlignment Left # ReceivedRepresenting @@ -200,8 +198,6 @@ function FormatHeader { Set-CellComment -Text "AttendeeCollection: The Attendee Collection of the Meeting, use -TrackingLogs to get values." -Row $HeaderRow -ColumnNumber $n -Worksheet $sheet $sheet.Column(++$n) | Set-ExcelRange -Width 40 -HorizontalAlignment Center # CalendarLogRequestId Set-CellComment -Text "CalendarLogRequestId: The Calendar Log Request ID of the Meeting." -Row $HeaderRow -ColumnNumber $n -Worksheet $sheet - $sheet.Column(++$n) | Set-ExcelRange -Width 120 -HorizontalAlignment Left # CleanGlobalObjectId - Set-CellComment -Text "CleanGlobalObjectId: The Clean Global Object ID of the Meeting." -Row $HeaderRow -ColumnNumber $n -Worksheet $sheet # Update header rows after all the others have been set. # Title Row diff --git a/Calendar/CalLogHelpers/Invoke-GetCalLogs.ps1 b/Calendar/CalLogHelpers/Invoke-GetCalLogs.ps1 index fdc4843d1..a8e087961 100644 --- a/Calendar/CalLogHelpers/Invoke-GetCalLogs.ps1 +++ b/Calendar/CalLogHelpers/Invoke-GetCalLogs.ps1 @@ -21,6 +21,7 @@ $script:CustomPropertyNameList = "FreeBusyStatus", "From", "HasAttachment", +"InternetMessageId", "ItemID", "IsAllDayEvent", "IsCancelled", @@ -39,6 +40,10 @@ $script:CustomPropertyNameList = $LogLimit = 2000 +if ($ShortLogs.IsPresent) { + $LogLimit = 500 +} + <# .SYNOPSIS Run Get-CalendarDiagnosticObjects for passed in User with Subject or MeetingID. diff --git a/Calendar/CalLogHelpers/Invoke-GetMailbox.ps1 b/Calendar/CalLogHelpers/Invoke-GetMailbox.ps1 index 92795adf5..4c928e060 100644 --- a/Calendar/CalLogHelpers/Invoke-GetMailbox.ps1 +++ b/Calendar/CalLogHelpers/Invoke-GetMailbox.ps1 @@ -226,7 +226,7 @@ function GetSMTPAddress { return $PassedCN } else { # We have a problem, we don't have a CN or an SMTP Address - Write-Error "GetSMTPAddress: Passed in Value does not look like a CN or SMTP Address: [$PassedCN]" + Write-Warning "GetSMTPAddress: Passed in Value does not look like a CN or SMTP Address: [$PassedCN]" return $PassedCN } } diff --git a/Calendar/CalLogHelpers/ShortClientNameFunctions.ps1 b/Calendar/CalLogHelpers/ShortClientNameFunctions.ps1 index 914854244..36ba1d591 100644 --- a/Calendar/CalLogHelpers/ShortClientNameFunctions.ps1 +++ b/Calendar/CalLogHelpers/ShortClientNameFunctions.ps1 @@ -18,7 +18,7 @@ function FindMatch { $ShortClientNameProcessor = @{ 'Client=Hub Transport' = "Transport" - 'Client=MSExchangeRPC' = "Outlook : Desktop : MAPI" + 'Client=MSExchangeRPC' = "Outlook:Desktop:MAPI" 'OneOutlook' = "NewOutlook" 'Lync for Mac' = "LyncMac" 'MicrosoftNinja' = "Teams" @@ -119,6 +119,8 @@ function CreateShortClientName { $LogClientInfoString -like "*43375d74-c6a5-4d4e-a0a3-de139860ea75*" -or $LogClientInfoString -like "*af9fc99a-5ae5-46e1-bbd7-fa25088e16c9*") { $ShortClientName = "ELC-B2" + } elseif ($LogClientInfoString -like "*AppId=de8bc8b5-d9f9-48b1-a8ad-b748da725064*") { + $ShortClientName = "GraphExplorer" } elseif ($LogClientInfoString -like "*Outlook-iOS*") { $ShortClientName = "OutlookiOS" } elseif ($LogClientInfoString -like "*Outlook-Android*") { diff --git a/Calendar/CalLogHelpers/TimelineFunctions.ps1 b/Calendar/CalLogHelpers/TimelineFunctions.ps1 index aa40f1f67..6d0eac026 100644 --- a/Calendar/CalLogHelpers/TimelineFunctions.ps1 +++ b/Calendar/CalLogHelpers/TimelineFunctions.ps1 @@ -67,7 +67,7 @@ function BuildTimeline { FindOrganizer($script:FirstLog) # Ignorable and items from Shared Calendars are not included in the TimeLine. - [array]$InterestingCalLogs = $script:EnhancedCalLogs | Where-Object { $_.LogType -eq "Core" -and $_.IsFromSharedCalendar -eq $False } + [array]$InterestingCalLogs = $script:EnhancedCalLogs | Where-Object { $_.LogType -eq "Core" -and $_.SharedFolderName -eq "Not Shared" } if ($InterestingCalLogs.count -eq 0) { Write-Host "All CalLogs are Ignorable, nothing to create a timeline with, displaying initial values." diff --git a/Calendar/Tests/ShortClientNameFunctions.Tests.ps1 b/Calendar/Tests/ShortClientNameFunctions.Tests.ps1 index a0ff93208..b6705a42e 100644 --- a/Calendar/Tests/ShortClientNameFunctions.Tests.ps1 +++ b/Calendar/Tests/ShortClientNameFunctions.Tests.ps1 @@ -17,14 +17,14 @@ Describe "CreateShortClientName" { } Context "When LogClientInfoString is Client=MSExchangeRPC" { - It "Should return 'Outlook : Desktop : MAPI'" { + It "Should return 'Outlook:Desktop:MAPI'" { $result = CreateShortClientName -LogClientInfoString "Client=MSExchangeRPC" - $result | Should -Be "Outlook : Desktop : MAPI" + $result | Should -Be "Outlook:Desktop:MAPI" } } Context "When LogClientInfoString is Client=WebServices;Microsoft Office/16.0 (Windows NT 10.0; Microsoft Outlook 16.0.17328; Pro);;Client=WebServices;ExchangeServicesClient/0.9.248.0;" { - It "Should return 'Outlook : Desktop : MAPI' if LogClientInfoString FileContentMatch 'AppId=bcad1a65-78eb-4725-9bce-ce1a8ed30b95'" { + It "Should return 'Outlook:Desktop:MAPI' if LogClientInfoString FileContentMatch 'AppId=bcad1a65-78eb-4725-9bce-ce1a8ed30b95'" { $result = CreateShortClientName "Client=WebServices;Microsoft Office/16.0 (Windows NT 10.0; Microsoft Outlook 16.0.17328; Pro);;Client=WebServices;ExchangeServicesClient/0.9.248.0;" $result | Should -Be "Outlook : Desktop" } @@ -169,7 +169,7 @@ Describe "CreateShortClientName-FindMatch" { Context 'Test CreateShortClientName focusing on the FindMatch function' -ForEach @( @{ LogClientInfoString = 'Client=Hub Transport'; Expected = "Transport" }, - @{ LogClientInfoString = 'Client=MSExchangeRPC'; Expected = "Outlook : Desktop : MAPI" }, + @{ LogClientInfoString = 'Client=MSExchangeRPC'; Expected = "Outlook:Desktop:MAPI" }, @{ LogClientInfoString = 'OneOutlook'; Expected = "NewOutlook" }, @{ LogClientInfoString = 'Lync for Mac'; Expected = "LyncMac" }, @{ LogClientInfoString = 'AppId=00000004-0000-0ff1-ce00-000000000000'; Expected = "SkypeMMS" },