Skip to content

Commit 0231ee9

Browse files
Update Get-MessageTrackingReport.md
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 }
1 parent b25070b commit 0231ee9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

exchange/exchange-ps/exchange/Get-MessageTrackingReport.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,9 @@ You need to be assigned permissions before you can run this cmdlet. Although thi
4848
```powershell
4949
$Temp = Search-MessageTrackingReport -Identity "David Jones" -Recipients "[email protected]"
5050
51-
Get-MessageTrackingReport -Identity $Temp.MessageTrackingReportID -ReportTemplate Summary
51+
foreach ($reportId in $Temp.MessageTrackingReportId) {
52+
Get-MessageTrackingReport -Identity $reportId -ReportTemplate Summary -Status Delivered
53+
}
5254
```
5355

5456
This example gets the message tracking report for messages sent from one user to another. This example returns the summary of the message tracking report for a message that David Jones sent to Wendy Richardson.

0 commit comments

Comments
 (0)