Skip to content

Commit

Permalink
Merge pull request #1938 from microsoft/main
Browse files Browse the repository at this point in the history
Release 1-12-24
  • Loading branch information
dpaulson45 authored Jan 12, 2024
2 parents d3ab94e + 9352a93 commit fdc83a1
Showing 1 changed file with 56 additions and 19 deletions.
75 changes: 56 additions & 19 deletions Calendar/Get-CalendarDiagnosticObjectsSummary.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,11 @@ $script:CalendarItemTypes = @{
$ShortClientNameProcessor = @{
'Client=Hub Transport' = "Transport"
'Client=MSExchangeRPC' = "Outlook-MAPI"
'OneOutlook' = "OneOutlook"
'Lync for Mac' = "LyncMac"
'AppId=00000004-0000-0ff1-ce00-000000000000' = "SkypeMMS"
'MicrosoftNinja' = "Teams"
'SkypeSpaces' = "Teams"
'Remove-CalendarEvents' = "RemoveCalendarEvent"
'Client=POP3/IMAP4' = "PopImap"
'Client=OWA' = "OWA"
Expand All @@ -115,6 +117,7 @@ $ShortClientNameProcessor = @{
'AppId=1e3faf23-d2d2-456a-9e3e-55db63b869b0' = "CiscoWebex"
'AppId=1c3a76cc-470a-46d7-8ba9-713cfbb2c01f' = "Time Service"
'AppId=48af08dc-f6d2-435f-b2a7-069abd99c086' = "RestConnector"
'AppId=7b7fdad6-df9d-4cd5-a4f2-b5f749350419' = "Bookings B2 Service"
'GriffinRestClient' = "GriffinRestClient"
'MacOutlook' = "MacOutlookRest"
'Outlook-iOS-Android' = "OutlookMobile"
Expand Down Expand Up @@ -268,6 +271,7 @@ function Convert-Data {
}
$FinalArray += $FinalObj
}

return $FinalArray
$FinalArray = @()
}
Expand Down Expand Up @@ -544,12 +548,20 @@ function CreateShortClientName {
$ShortClientName = "RestConnector"
} elseif ($ClientInfoString -like "*GriffinRestClient*") {
$ShortClientName = "GriffinRestClient"
} elseif ($ClientInfoString -like "*NoUserAgent*") {
$ShortClientName = "RestUnknown"
} elseif ($ClientInfoString -like "*MacOutlook*") {
$ShortClientName = "MacOutlookRest"
} elseif ($ClientInfoString -like "*Microsoft Outlook 16*") {
$ShortClientName = "Outlook-ModernCalendarSharing"
} elseif ($ClientInfoString -like "*SkypeSpaces*") {
$ShortClientName = "Teams"
} elseif ($ClientInfoString -like "*AppId=7b7fdad6-df9d-4cd5-a4f2-b5f749350419*") {
$ShortClientName = "Bookings B2 Service"
} elseif ($ClientInfoString -like "*bcad1a65-78eb-4725-9bce-ce1a8ed30b95*" -or
$ClientInfoString -like "*43375d74-c6a5-4d4e-a0a3-de139860ea75*" -or
$ClientInfoString -like "*af9fc99a-5ae5-46e1-bbd7-fa25088e16c9*") {
$ShortClientName = "ELC-B2"
} elseif ($ClientInfoString -like "*NoUserAgent*") {
$ShortClientName = "RestUnknown"
} else {
$ShortClientName = "[Unknown Rest Client]"
}
Expand All @@ -566,7 +578,9 @@ function CreateShortClientName {
}
}

if ($ClientInfoString -like "*InternalCalendarSharing*" -and $ClientInfoString -like "*OWA*") {
if ($ClientInfoString -like "*InternalCalendarSharing*" -and
$ClientInfoString -like "*OWA*" -and
$ClientInfoString -notlike "*OneOutlook*") {
$ShortClientName = "Owa-ModernCalendarSharing"
}
if ($ClientInfoString -like "*InternalCalendarSharing*" -and $ClientInfoString -like "*MacOutlook*") {
Expand All @@ -578,7 +592,9 @@ function CreateShortClientName {
if ($ClientInfoString -like "Client=ActiveSync*" -and $ClientInfoString -like "*Outlook*") {
$ShortClientName = "Outlook-ModernCalendarSharing"
}

if ($ClientInfoString -like "*OneOutlook*") {
$ShortClientName = "OneOutlook"
}
if ($ShortClientName -eq "") {
$ShortClientName = "[NoShortNameFound]"
}
Expand All @@ -596,17 +612,22 @@ function SetIsIgnorable {
$CalLog
)

if ($ShortClientName -like "EBA*" `
-or $ShortClientName -like "TBA*" `
-or $ShortClientName -eq "LocationProcessor" `
-or $ShortClientName -eq "GriffinRestClient" `
-or $ShortClientName -eq "RestConnector" `
-or $ShortClientName -eq "CalendarReplication" `
-or $ShortClientName -eq "TimeService" `
-or $CalendarItemTypes.($CalLog.ItemClass) -eq "SharingCFM" `
-or $CalendarItemTypes.($CalLog.ItemClass) -eq "SharingDelete" `
-or $CalendarItemTypes.($CalLog.ItemClass) -eq "AttendeeList" `
-or $CalendarItemTypes.($CalLog.ItemClass) -eq "RespAny") {
if ($ShortClientName -like "TBA*SharingSyncAssistant" -or
$ShortClientName -eq "CalendarReplication" -or
$CalendarItemTypes.($CalLog.ItemClass) -eq "SharingCFM" -or
$CalendarItemTypes.($CalLog.ItemClass) -eq "SharingDelete") {
return "Sharing"
} elseif (($CalendarItemTypes.($CalLog.ItemClass) -like "*Resp*" -and
$CalLog.CalendarLogTriggerAction -ne "Create" ) -or
$CalendarItemTypes.($CalLog.ItemClass) -eq "AttendeeList") {
return "Resp"
} elseif ($ShortClientName -like "EBA*" -or
$ShortClientName -like "TBA*" -or
$ShortClientName -eq "LocationProcessor" -or
$ShortClientName -eq "GriffinRestClient" -or
$ShortClientName -eq "RestConnector" -or
$ShortClientName -eq "ELC-B2" -or
$ShortClientName -eq "TimeService" ) {
return "True"
} else {
return "False"
Expand Down Expand Up @@ -701,10 +722,13 @@ function BuildCSV {

$IsIgnorable = SetIsIgnorable($CalLog)

# CleanNotFounds;
# CleanNotFounds
$PropsToClean = "FreeBusyStatus", "ClientIntent", "AppointmentLastSequenceNumber", "RecurrencePattern", "AppointmentAuxiliaryFlags", "IsOrganizerProperty", "EventEmailReminderTimer", "IsSeriesCancelled", "AppointmentCounterProposal", "MeetingRequestType"
foreach ($Prop in $PropsToClean) {
$CalLog.$Prop = ReplaceNotFound($CalLog.$Prop)
# Exception objects, etc. don't have these properties.
if ($null -ne $CalLog.$Prop) {
$CalLog.$Prop = ReplaceNotFound($CalLog.$Prop)
}
}

if ($CalLogACP -eq "NotFound") {
Expand Down Expand Up @@ -861,7 +885,11 @@ function MeetingSummary {
$MeetingChanges += $InitialToList, $InitialLocation, $InitialStartTime, $InitialEndTime, $InitialRecurring
}

Convert-Data -ArrayNames "Time", "MeetingChanges"
# Convert-Data -ArrayNames "Time", "MeetingChanges" >> $Script:TimeLineFilename
$TimeLineOutput = Convert-Data -ArrayNames "Time", "MeetingChanges"

$TimeLineOutput | Export-Csv -Path $Script:TimeLineFilename -NoTypeInformation -Encoding UTF8 -Append
$TimeLineOutput
}

# ===================================================================================================
Expand Down Expand Up @@ -894,6 +922,14 @@ function BuildTimeline {
param (
[string] $Identity
)
$ThisMeetingID = $script:GCDO.CleanGlobalObjectId | Select-Object -Unique
$ShortMeetingID = $ThisMeetingID.Substring($ThisMeetingID.length - 6)
if ($Identity -like "*@*") {
$ShortName = $Identity.Split('@')[0]
}
$ShortName = $ShortName.Substring(0, [System.Math]::Min(20, $ShortName.Length))
$Script:TimeLineFilename = "$($ShortName)_TimeLine_$ShortMeetingID.csv"

Write-DashLineBoxColor " TimeLine for [$Identity]:",
" Subject: $($script:GCDO[0].NormalizedSubject)",
" Organizer: $($script:GCDO[0].SentRepresentingDisplayName)",
Expand Down Expand Up @@ -1422,7 +1458,8 @@ function GetCalLogsWithSubject {
$script:GCDO = $InitialCDOs; # use the CalLogs that we already have, since there is only one.
BuildCSV -Identity $Identity
BuildTimeline -Identity $Identity
}$ID
}

# Get the CalLogs for each MeetingID found.
if ($GlobalObjectIds.count -gt 1) {
Write-Host "Found multiple GlobalObjectIds: $($GlobalObjectIds.Count)."
Expand Down

0 comments on commit fdc83a1

Please sign in to comment.