Skip to content

Conversation

MarcoLFrancisco
Copy link
Contributor

@MarcoLFrancisco MarcoLFrancisco commented Mar 11, 2025

When you do something like:

$Temp = Search-MessageTrackingReport -Identity "Jane" -Recipients John@contoso.com -TraceLevel High

You are storing several instances in the $Temp variable (which means $Temp is essentially a collection).

When running this next command:

Get-MessageTrackingReport -Identity $Temp.MessageTrackingReportID -ReportTemplate Summary -Status Delivered

You're providing multiple MessageTrackingReportIds at once—but this particular cmdlet expects just one identity at a time.

Hence, you receive an error saying PowerShell couldn't transform an ArrayList into an expected single identity.

Solution:

Handle this using a loop, iterating over each MessageTrackingReportId one-by-one. Here's an easy method:

Loop through each MessageTrackingReportId stored in $Temp and retrieve detailed tracking report summary:

foreach ($reportId in $Temp.MessageTrackingReportId) {
    Get-MessageTrackingReport -Identity $reportId -ReportTemplate Summary -Status Delivered
}

When you do something like:


$Temp = Search-MessageTrackingReport -Identity "Jane" -Recipients [email protected] -TraceLevel High

You are storing several instances in the $Temp variable (which means $Temp is essentially a collection). 

When running this next command:

Get-MessageTrackingReport -Identity $Temp.MessageTrackingReportID -ReportTemplate Summary -Status Delivered

You're providing multiple MessageTrackingReportIds at once—but this particular cmdlet expects just one identity at a time. 

Hence, you receive an error saying PowerShell couldn't transform an ArrayList into an expected single identity.

Solution:

Handle this using a loop, iterating over each MessageTrackingReportId one-by-one. Here's an easy method:

# Loop through each MessageTrackingReportId stored in $Temp and retrieve detailed tracking report summary

foreach ($reportId in $Temp.MessageTrackingReportId) {
    Get-MessageTrackingReport -Identity $reportId -ReportTemplate Summary -Status Delivered
}
Copy link

Learn Build status updates of commit 0231ee9:

✅ Validation status: passed

File Status Preview URL Details
exchange/exchange-ps/exchange/Get-MessageTrackingReport.md ✅Succeeded View (exchange-ps)

For more details, please refer to the build report.

For any questions, please:

@chrisda chrisda merged commit ac25c15 into MicrosoftDocs:main Mar 11, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants