Skip to content

Commit

Permalink
Merge branch 'main' into RossTestBranch
Browse files Browse the repository at this point in the history
  • Loading branch information
iserrano76 committed Aug 1, 2024
2 parents 6406fb9 + 36dad40 commit 58cc264
Show file tree
Hide file tree
Showing 5 changed files with 69 additions and 51 deletions.
2 changes: 1 addition & 1 deletion .build/HelpFunctions/Get-CommitFilesOnBranch.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ function Get-CommitFilesOnBranch {
$m = $gitStatus | Select-String "M (.*)"
foreach ($match in $m) {
$file = $match.Matches.Groups[1].Value.Trim()
$fullPath = Join-Path $PSScriptRoot $file
$fullPath = Join-Path $repoRoot $file

Write-Verbose "Adding modified file to list: $fullPath"
[void]$filesFullPath.Add($fullPath)
Expand Down
7 changes: 4 additions & 3 deletions Admin/Test-AMSI.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ begin {
} while ((-not $foundRequest) -and ($remainSeconds -gt 0))
Write-Progress -Activity "Searching on logs ..." -Completed
if (-not $foundRequest) {
Write-Warning "We have not found the request on FrontEnd server: $Server." -ForegroundColor Red
Write-Host "We have not found the request on FrontEnd server: $Server." -ForegroundColor Red
if ($SearchHttpRequestFiltering) {
Write-Host "Server: $Server has not record on HttpRequestFiltering log" -ForegroundColor Red
}
Expand Down Expand Up @@ -648,11 +648,12 @@ process {
}

$uniqueSites = $null
if ($localServer) {
if ((($SupportedExchangeServers.Site)[0]).PSObject.Properties.Name -contains 'Name') {
$uniqueSites = $SupportedExchangeServers.Site.Name | Get-Unique
} else {
$uniqueSites = $SupportedExchangeServers.Site | Get-Unique | ForEach-Object { $_.split('/')[-1] }
}

$sitesCounter = $uniqueSites.count

if ($Sites) {
Expand All @@ -661,7 +662,7 @@ process {
Write-Warning "We did not find site $site"
}
}
if ($localServer) {
if ((($SupportedExchangeServers.Site)[0]).PSObject.Properties.Name -contains 'Name') {
$fullList = ($SupportedExchangeServers | Where-Object { $Sites -contains $_.Site.Name } | Select-Object Name).Name
} else {
$fullList = ($SupportedExchangeServers | Where-Object { $Sites -contains $_.Site.split('/')[-1] } | Select-Object Name).Name
Expand Down
11 changes: 8 additions & 3 deletions Calendar/CalLogHelpers/ShortClientNameFunctions.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function FindMatch {
$ShortClientNameProcessor = @{
'Client=Hub Transport' = "Transport"
'Client=MSExchangeRPC' = "Outlook : Desktop : MAPI"
'OneOutlook' = "OneOutlook"
'OneOutlook' = "NewOutlook"
'Lync for Mac' = "LyncMac"
'MicrosoftNinja' = "Teams"
'SkypeSpaces' = "Teams"
Expand Down Expand Up @@ -63,6 +63,11 @@ function CreateShortClientName {
return $ShortClientName
}

if ($LogClientInfoString -like "*AppId=00000007-0000-0000-c000-000000000000*") {
$ShortClientName = "CRM"
return $ShortClientName
}

if ($LogClientInfoString -like "Client=EBA*" -or $LogClientInfoString -like "Client=TBA*") {
if ($LogClientInfoString -like "*ResourceBookingAssistant*") {
$ShortClientName = "ResourceBookingAssistant"
Expand Down Expand Up @@ -151,15 +156,15 @@ function CreateShortClientName {
$LogClientInfoString -notlike "*Outlook-iOS*") {
$ShortClientName = "Outlook : Desktop : REST"
} elseif ($LogClientInfoString -like "*OneOutlook*") {
$ShortClientName = "OneOutlook"
$ShortClientName = "NewOutlook"
}
}

if ($LogClientInfoString -like "Client=ActiveSync*" -and $LogClientInfoString -like "*Outlook*") {
$ShortClientName = "Outlook : ActiveSync"
}
if ($LogClientInfoString -like "*OneOutlook*") {
$ShortClientName = "OneOutlook"
$ShortClientName = "NewOutlook"
}
if ($ShortClientName -eq "") {
$ShortClientName = "[NoShortNameFound]"
Expand Down
98 changes: 55 additions & 43 deletions Calendar/Get-CalendarDiagnosticObjectsSummary.ps1
Original file line number Diff line number Diff line change
@@ -1,61 +1,73 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
#
# .DESCRIPTION
# This Exchange Online script runs the Get-CalendarDiagnosticObjects script and returns a summarized timeline of actions in clear english
# as well as the Calendar Diagnostic Objects in CSV format.
#
# .PARAMETER Identity
# One or more SMTP Address of EXO User Mailbox to query.
#
# .PARAMETER Subject
# Subject of the meeting to query, only valid if Identity is a single user.
#
# .PARAMETER MeetingID
# The MeetingID of the meeting to query.
#
# .PARAMETER TrackingLogs
# Include specific tracking logs in the output. Only useable with the MeetingID parameter.
#
# .PARAMETER Exceptions
# Include Exception objects in the output. Only useable with the MeetingID parameter.
#
# .PARAMETER ExportToExcel
# [Beta Feature] Export the output to an Excel file with formatting. Running the scrip for multiple users will create multiple tabs in the Excel file.
#
# .PARAMETER CaseNumber
# Case Number to include in the Filename of the output.
#
# .PARAMETER ShortLogs
# Limit Logs to 500 instead of the default 2000, in case the server has trouble responding with the full logs.
#
# .EXAMPLE
# Get-CalendarDiagnosticObjectsSummary.ps1 -Identity [email protected] -MeetingID 040000008200E00074C5B7101A82E008000000008063B5677577D9010000000000000000100000002FCDF04279AF6940A5BFB94F9B9F73CD
#
# Get-CalendarDiagnosticObjectsSummary.ps1 -Identity [email protected] -Subject "Test One Meeting Subject"
#
# Get-CalendarDiagnosticObjectsSummary.ps1 -Identity User1, User2, Delegate -MeetingID $MeetingID
#
# Get-CalendarDiagnosticObjectsSummary.ps1 -Identity $Users -MeetingID $MeetingID -TrackingLogs -Exceptions
#
# Get-CalendarDiagnosticObjectsSummary.ps1 -Identity $Users -MeetingID $MeetingID -TrackingLogs -Exceptions -ExportToExcel -CaseNumber 123456
#

<#
.DESCRIPTION
This Exchange Online script runs the Get-CalendarDiagnosticObjects script and returns a summarized timeline of actions in clear english
as well as the Calendar Diagnostic Objects in CSV format.
.PARAMETER Identity
One or more SMTP Address of EXO User Mailbox to query.
.PARAMETER Subject
Subject of the meeting to query, only valid if Identity is a single user.
.PARAMETER MeetingID
The MeetingID of the meeting to query.
.PARAMETER TrackingLogs
Include specific tracking logs in the output. Only useable with the MeetingID parameter.
.PARAMETER Exceptions
Include Exception objects in the output. Only useable with the MeetingID parameter.
.PARAMETER ExportToExcel
[Beta Feature] Export the output to an Excel file with formatting. Running the scrip for multiple users will create multiple tabs in the Excel file.
.PARAMETER CaseNumber
Case Number to include in the Filename of the output.
.PARAMETER ShortLogs
Limit Logs to 500 instead of the default 2000, in case the server has trouble responding with the full logs.
.EXAMPLE
Get-CalendarDiagnosticObjectsSummary.ps1 -Identity [email protected] -MeetingID 040000008200E00074C5B7101A82E008000000008063B5677577D9010000000000000000100000002FCDF04279AF6940A5BFB94F9B9F73CD
.EXAMPLE
Get-CalendarDiagnosticObjectsSummary.ps1 -Identity [email protected] -Subject "Test One Meeting Subject"
.EXAMPLE
Get-CalendarDiagnosticObjectsSummary.ps1 -Identity User1, User2, Delegate -MeetingID $MeetingID
.EXAMPLE
Get-CalendarDiagnosticObjectsSummary.ps1 -Identity $Users -MeetingID $MeetingID -TrackingLogs -Exceptions
.EXAMPLE
Get-CalendarDiagnosticObjectsSummary.ps1 -Identity $Users -MeetingID $MeetingID -TrackingLogs -Exceptions -ExportToExcel -CaseNumber 123456
.SYNOPSIS
Used to collect easy to read Calendar Logs.
.LINK
https://aka.ms/callogformatter
#>

[CmdletBinding(DefaultParameterSetName = 'Subject',
SupportsShouldProcess = $true)]
param (
[Parameter(Mandatory, Position = 0)]
[Parameter(Mandatory, Position = 0, HelpMessage = "Enter the Identity of the mailbox(es) to query. Press <Enter> again when done.")]
[string[]]$Identity,
[Parameter(HelpMessage = "Export all Logs to Excel.")]
[switch]$ExportToExcel,
[Parameter(HelpMessage = "Case Number to include in the Filename of the output.")]
[string]$CaseNumber,
[Parameter(HelpMessage = "Limit Logs to 500 instead of the default 2000, in case the server has trouble responding with the full logs.")]
[switch]$ShortLogs,

[Parameter(Mandatory, ParameterSetName = 'MeetingID', Position = 1)]
[Parameter(Mandatory, ParameterSetName = 'MeetingID', Position = 1, HelpMessage = "Enter the MeetingID of the meeting to query. Recommended way to search for CalLogs.")]
[string]$MeetingID,
[Parameter(HelpMessage = "Include specific tracking logs in the output. Only useable with the MeetingID parameter.")]
[switch]$TrackingLogs,
[Parameter(HelpMessage = "Include Exception objects in the output. Only useable with the MeetingID parameter.")]
[switch]$Exceptions,

[Parameter(Mandatory, ParameterSetName = 'Subject', Position = 1)]
[Parameter(Mandatory, ParameterSetName = 'Subject', Position = 1, HelpMessage = "Enter the Subject of the meeting. Do not include the RE:, FW:, etc..")]
[string]$Subject
)

Expand Down
2 changes: 1 addition & 1 deletion Calendar/Tests/ShortClientNameFunctions.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,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 = 'OneOutlook'; Expected = "OneOutlook" },
@{ LogClientInfoString = 'OneOutlook'; Expected = "NewOutlook" },
@{ LogClientInfoString = 'Lync for Mac'; Expected = "LyncMac" },
@{ LogClientInfoString = 'AppId=00000004-0000-0ff1-ce00-000000000000'; Expected = "SkypeMMS" },
@{ LogClientInfoString = 'MicrosoftNinja'; Expected = "Teams" },
Expand Down

0 comments on commit 58cc264

Please sign in to comment.