Skip to content

Commit ff08216

Browse files
committed
Updates. Ready for review.
1 parent 0bc60e1 commit ff08216

File tree

2 files changed

+58
-45
lines changed

2 files changed

+58
-45
lines changed

exchange/exchange-ps/exchange/Get-MessageTraceDetailV2.md

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
external help file: Microsoft.Exchange.TransportMailflow-Help.xml
33
online version: https://learn.microsoft.com/powershell/module/exchange/get-messagetracedetailv2
4-
applicable: Exchange Online, Exchange Online Protection
4+
applicable: Exchange Online
55
title: Get-MessageTraceDetailV2
66
schema: 2.0.0
77
author: chrisda
@@ -27,23 +27,25 @@ Get-MessageTraceDetailV2 [-MessageTraceId] <Guid> [-RecipientAddress] <String>
2727
```
2828

2929
## DESCRIPTION
30-
{{ Fill in the Description }}
30+
You can use this cmdlet to search message data for the last 90 days. You can only query 10 days worth of data per query. If you enter a timeframe that's older than 90 days, you receive an error and the command will return no results.
31+
32+
You need to be assigned permissions before you can run this cmdlet. Although this topic lists all parameters for the cmdlet, you may not have access to some parameters if they're not included in the permissions assigned to you. To find the permissions required to run any cmdlet or parameter in your organization, see [Find the permissions required to run any Exchange cmdlet](https://learn.microsoft.com/powershell/exchange/find-exchange-cmdlet-permissions).
3133

3234
## EXAMPLES
3335

3436
### Example 1
3537
```powershell
36-
Get-MessageTraceDetail -MessageTraceId ae5c1219-4c90-41bf-fef5-08d837917e7c -RecipientAddress [email protected]
38+
Get-MessageTraceDetailV2 -MessageTraceId ae5c1219-4c90-41bf-fef5-08d837917e7c -RecipientAddress [email protected]
3739
```
3840

3941
This example retrieves detailed message trace information for messages with the message trace ID value ae5c1219-4c90-41bf-fef5-08d837917e7c that were received by `[email protected]`.
4042

4143
### Example 2
4244
```powershell
43-
Get-MessageTrace -MessageTraceId 2bbad36aa4674c7ba82f4b307fff549f -SenderAddress [email protected] -StartDate 05/13/2025 -EndDate 05/15/2025 | Get-MessageTraceDetail
45+
Get-MessageTraceV2 -MessageTraceId 2bbad36aa4674c7ba82f4b307fff549f -SenderAddress [email protected] -StartDate 06/13/2025 -EndDate 06/15/2025 | Get-MessageTraceDetailV2
4446
```
4547

46-
This example uses the Get-MessageTrace cmdlet to retrieve message trace information for messages with the Exchange Network Message ID value 2bbad36aa4674c7ba82f4b307fff549f sent by `[email protected]` between May 13, 2025 and May 15, 2025, and pipelines the results to the Get-MessageTraceDetail cmdlet.
48+
This example uses the Get-MessageTrace cmdlet to retrieve message trace information for messages with the Exchange Network Message ID value 2bbad36aa4674c7ba82f4b307fff549f sent by `[email protected]` between June 13, 2025 and June 15, 2025, and pipelines the results to the Get-MessageTraceDetailV2 cmdlet.
4749

4850
## PARAMETERS
4951

@@ -62,7 +64,7 @@ The MessageTraceId value is also available in the output of the following cmdlet
6264
Type: Guid
6365
Parameter Sets: (All)
6466
Aliases:
65-
Applicable: Exchange Online, Exchange Online Protection
67+
Applicable: Exchange Online
6668

6769
Required: True
6870
Position: 5
@@ -78,7 +80,7 @@ The RecipientAddress parameter filters the results by the recipient's email addr
7880
Type: String
7981
Parameter Sets: (All)
8082
Aliases:
81-
Applicable: Exchange Online, Exchange Online Protection
83+
Applicable: Exchange Online
8284

8385
Required: True
8486
Position: 6
@@ -96,7 +98,7 @@ You can specify multiple values separated by commas.
9698
Type: MultiValuedProperty
9799
Parameter Sets: (All)
98100
Aliases:
99-
Applicable: Exchange Online, Exchange Online Protection
101+
Applicable: Exchange Online
100102
101103
Required: False
102104
Position: 1
@@ -116,7 +118,7 @@ If don't use the StartDate and EndDate parameters, only data from the last 48 ho
116118
Type: System.DateTime
117119
Parameter Sets: (All)
118120
Aliases:
119-
Applicable: Exchange Online, Exchange Online Protection
121+
Applicable: Exchange Online
120122
121123
Required: False
122124
Position: 2
@@ -142,7 +144,7 @@ You can specify multiple values separated by commas.
142144
Type: MultiValuedProperty
143145
Parameter Sets: (All)
144146
Aliases:
145-
Applicable: Exchange Online, Exchange Online Protection
147+
Applicable: Exchange Online
146148
147149
Required: False
148150
Position: 3
@@ -158,7 +160,7 @@ The MessageId parameter filters the results by the Message-ID header field of th
158160
Type: String
159161
Parameter Sets: (All)
160162
Aliases:
161-
Applicable: Exchange Online, Exchange Online Protection
163+
Applicable: Exchange Online
162164
163165
Required: False
164166
Position: 4
@@ -174,7 +176,7 @@ The SenderAddress parameter filters the results by the sender's email address. Y
174176
Type: String
175177
Parameter Sets: (All)
176178
Aliases:
177-
Applicable: Exchange Online, Exchange Online Protection
179+
Applicable: Exchange Online
178180
179181
Required: False
180182
Position: 7
@@ -194,7 +196,7 @@ If don't use the StartDate and EndDate parameters, only data from the last 48 ho
194196
Type: System.DateTime
195197
Parameter Sets: (All)
196198
Aliases:
197-
Applicable: Exchange Online, Exchange Online Protection
199+
Applicable: Exchange Online
198200
199201
Required: False
200202
Position: 8

exchange/exchange-ps/exchange/Get-MessageTraceV2.md

Lines changed: 43 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
external help file: Microsoft.Exchange.TransportMailflow-Help.xml
33
online version: https://learn.microsoft.com/powershell/module/exchange/get-messagetracev2
4-
applicable: Exchange Online, Exchange Online Protection
4+
applicable: Exchange Online
55
title: Get-MessageTraceV2
66
schema: 2.0.0
77
author: chrisda
@@ -39,26 +39,31 @@ Get-MessageTraceV2
3939
```
4040

4141
## DESCRIPTION
42-
You can use this cmdlet to search message data for the last 10 days. If you run this cmdlet without any parameters, only data from the last 48 hours is returned.
42+
You can use this cmdlet to search message data for the last 90 days. If you run this cmdlet without any parameters, only data from the last 48 hours is returned. You can only return 10 days worth of data per query.
4343

44-
If you enter a start date that is older than 10 days, you will receive an error and the command will return no results.
44+
By default, this cmdlet returns up to 1000 results, with a maximum of 5000 results. If your data exceeds the result size, query in multiple rounds or use smaller StartDate and EndDate intervals.
4545

46-
To search for message data that is greater than 10 days old, use the Start-HistoricalSearch and Get-HistoricalSearch cmdlets.
46+
The time stamps on the output are in UTC time format. That might be different from the time format that you used for the -StartDate and the -EndDate parameters.
4747

48-
By default, this cmdlet returns a maximum of 1000 results, and will timeout on very large queries. If your query returns too many results, consider splitting it up using smaller StartDate and EndDate intervals.
48+
Pagination isn't supported in this cmdlet. Throttling based on the number of queries ensures the fair use of resources:
4949

50-
The time stamps on the output are in UTC time format. That might be different from the time format that you used for the -StartDate and the -EndDate parameters.
50+
- Use the ResultSize parameter to adjust the size of your results.
51+
- To query subsequent data, use the StartingRecipientAddress and EndDate parameters with the values from the **Recipient address** and **Received Time** properties respectively of the previous result in the next query.
52+
- Be as precise as possible. Narrow the gap between StartDate and EndDate and use additional parameters (for example, SenderAddress) where possible.
53+
- Use MessageTraceId where possible (required for messages sent to more than 1000 recipients).
54+
55+
The StartingRecipientAddress parameter is used with the EndDate parameter to query subsequent data for partial results that are partial while avoiding duplication. Query subsequent data of your partial results by taking the **Recipient address** and **Received Time** values of the last record of your partial results and using them as the values for the StartingRecipientAddress and EndDate parameters respectively in your next query.
5156

5257
You need to be assigned permissions before you can run this cmdlet. Although this topic lists all parameters for the cmdlet, you may not have access to some parameters if they're not included in the permissions assigned to you. To find the permissions required to run any cmdlet or parameter in your organization, see [Find the permissions required to run any Exchange cmdlet](https://learn.microsoft.com/powershell/exchange/find-exchange-cmdlet-permissions).
5358

5459
## EXAMPLES
5560

5661
### Example 1
5762
```powershell
58-
Get-MessageTraceV2 -SenderAddress [email protected] -StartDate 05/13/2025 -EndDate 05/15/2025
63+
Get-MessageTraceV2 -SenderAddress [email protected] -StartDate 06/13/2025 -EndDate 06/15/2025
5964
```
6065

61-
This example retrieves message trace information for messages sent by `[email protected]` between May 13, 2025 and May 15, 2025.
66+
This example retrieves message trace information for messages sent by `[email protected]` between June 13, 2025 and June 15, 2025.
6267

6368
## PARAMETERS
6469

@@ -71,7 +76,7 @@ Use the short date format that's defined in the Regional Options settings on the
7176
Type: System.DateTime
7277
Parameter Sets: (All)
7378
Aliases:
74-
Applicable: Exchange Online, Exchange Online Protection
79+
Applicable: Exchange Online
7580

7681
Required: False
7782
Position: 1
@@ -87,7 +92,7 @@ The FromIP parameter filters the results by the source IP address. For incoming
8792
Type: String
8893
Parameter Sets: (All)
8994
Aliases:
90-
Applicable: Exchange Online, Exchange Online Protection
95+
Applicable: Exchange Online
9196

9297
Required: False
9398
Position: 2
@@ -103,7 +108,7 @@ The MessageId parameter filters the results by the Message-ID header field of th
103108
Type: MultiValuedProperty
104109
Parameter Sets: (All)
105110
Aliases:
106-
Applicable: Exchange Online, Exchange Online Protection
111+
Applicable: Exchange Online
107112

108113
Required: False
109114
Position: 3
@@ -127,7 +132,7 @@ The MessageTraceId value is also available in the output of the following cmdlet
127132
Type: System.Guid
128133
Parameter Sets: (All)
129134
Aliases:
130-
Applicable: Exchange Online, Exchange Online Protection
135+
Applicable: Exchange Online
131136

132137
Required: False
133138
Position: 4
@@ -143,7 +148,7 @@ The RecipientAddress parameter filters the results by the recipient's email addr
143148
Type: MultiValuedProperty
144149
Parameter Sets: (All)
145150
Aliases:
146-
Applicable: Exchange Online, Exchange Online Protection
151+
Applicable: Exchange Online
147152

148153
Required: False
149154
Position: 5
@@ -153,13 +158,15 @@ Accept wildcard characters: False
153158
```
154159
155160
### -ResultSize
156-
The ResultSize parameter specifies the maximum number of results to return. A valid value is from 1 to 5000.
161+
The ResultSize parameter specifies the maximum number of results to return. A valid value is from 1 to 5000. The default value is 1000.
162+
163+
**Note**: This parameter replaces the PageSize parameter that was available on the Get-MessageTrace cmdlet.
157164
158165
```yaml
159166
Type: Int32
160167
Parameter Sets: (All)
161168
Aliases:
162-
Applicable: Exchange Online, Exchange Online Protection
169+
Applicable: Exchange Online
163170

164171
Required: False
165172
Position: 6
@@ -175,7 +182,7 @@ The SenderAddress parameter filters the results by the sender's email address. Y
175182
Type: MultiValuedProperty
176183
Parameter Sets: (All)
177184
Aliases:
178-
Applicable: Exchange Online, Exchange Online Protection
185+
Applicable: Exchange Online
179186

180187
Required: False
181188
Position: 7
@@ -193,7 +200,7 @@ Use the short date format that's defined in the Regional Options settings on the
193200
Type: System.DateTime
194201
Parameter Sets: (All)
195202
Aliases:
196-
Applicable: Exchange Online, Exchange Online Protection
203+
Applicable: Exchange Online
197204

198205
Required: False
199206
Position: 8
@@ -203,13 +210,13 @@ Accept wildcard characters: False
203210
```
204211
205212
### -StartingRecipientAddress
206-
{{ Fill StartingRecipientAddress Description }}
213+
The StartingRecipientAddress parameter is used with the EndDate parameter to query subsequent data for partial results while avoiding duplication. Query subsequent data by taking the **Recipient address** and **Received Time** values of the last record of the partial results and using them as the values for the StartingRecipientAddress and EndDate parameters respectively in the next query.
207214
208215
```yaml
209216
Type: String
210217
Parameter Sets: (All)
211218
Aliases:
212-
Applicable: Exchange Online, Exchange Online Protection
219+
Applicable: Exchange Online
213220

214221
Required: False
215222
Position: 9
@@ -219,22 +226,24 @@ Accept wildcard characters: False
219226
```
220227
221228
### -Status
222-
The Status parameter filters the results by the delivery status of the message. Valid values for this parameter are:
229+
The Status parameter filters the results by the delivery status of the message. Valid values are:
223230
224-
- None: The message has no delivery status because it was rejected or redirected to a different recipient.
225-
- GettingStatus: The message is waiting for status update.
226-
- Failed: Message delivery was attempted and it failed or the message was filtered as spam or malware, or by transport rules.
227-
- Pending: Message delivery is underway or was deferred and is being retried.
228231
- Delivered: The message was delivered to its destination.
229232
- Expanded: There was no message delivery because the message was addressed to a distribution group and the membership of the distribution was expanded.
230-
- Quarantined: The message was quarantined.
233+
- Failed: Message delivery was attempted and it failed.
231234
- FilteredAsSpam: The message was marked as spam.
235+
- GettingStatus: The message is waiting for status update.
236+
- None: The message has no delivery status because it was rejected or redirected to a different recipient.
237+
- Pending: Message delivery is underway or was deferred and is being retried.
238+
- Quarantined: The message was quarantined.
239+
240+
You can separate multiple values separated by commas.
232241
233242
```yaml
234243
Type: MultiValuedProperty
235244
Parameter Sets: (All)
236245
Aliases:
237-
Applicable: Exchange Online, Exchange Online Protection
246+
Applicable: Exchange Online
238247

239248
Required: False
240249
Position: 10
@@ -252,7 +261,7 @@ You specify how the value is evaluated in the message subject by using the Subje
252261
Type: String
253262
Parameter Sets: (All)
254263
Aliases:
255-
Applicable: Exchange Online, Exchange Online Protection
264+
Applicable: Exchange Online
256265

257266
Required: False
258267
Position: 11
@@ -262,17 +271,19 @@ Accept wildcard characters: False
262271
```
263272
264273
### -SubjectFilterType
265-
The SubjectFilterType parameter specifies how the value specified by the Subject parameter is evaluated. Valid values are:
274+
The SubjectFilterType parameter specifies how the value of the Subject parameter is evaluated. Valid values are:
266275
267276
- Contains
268-
- EndWith
269-
- StartWith
277+
- EndsWith
278+
- StartsWith
279+
280+
We recommend using StartsWith or EndsWith instead of Contains whenever possible.
270281
271282
```yaml
272283
Type: String
273284
Parameter Sets: (All)
274285
Aliases:
275-
Applicable: Exchange Online, Exchange Online Protection
286+
Applicable: Exchange Online
276287

277288
Required: False
278289
Position: 12
@@ -288,7 +299,7 @@ The ToIP parameter filters the results by the destination IP address. For outgoi
288299
Type: String
289300
Parameter Sets: (All)
290301
Aliases:
291-
Applicable: Exchange Online, Exchange Online Protection
302+
Applicable: Exchange Online
292303

293304
Required: False
294305
Position: 13

0 commit comments

Comments
 (0)