Commit 0231ee9
authored
Update Get-MessageTrackingReport.md
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
}1 parent b25070b commit 0231ee9
1 file changed
+3
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
52 | 54 | | |
53 | 55 | | |
54 | 56 | | |
| |||
0 commit comments