File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
Modules/CIPPCore/Public/Entrypoints/HTTP Functions/Email-Exchange Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -15,9 +15,15 @@ Function Invoke-ListMessageTrace {
15
15
16
16
try {
17
17
$TenantFilter = $Request.Body.tenantFilter
18
- $SearchParams = @ {
19
- StartDate = (Get-Date ).AddDays( - $ ($Request.Body.days )).ToUniversalTime().ToString(' s' )
20
- EndDate = (Get-Date ).ToUniversalTime().ToString(' s' )
18
+
19
+ if ($Request.Body.MessageId ) {
20
+ $SearchParams = @ { ' MessageId' = $Request.Body.messageId }
21
+ } else {
22
+ $Days = $Request.Body.days
23
+ $SearchParams = @ {
24
+ StartDate = (Get-Date ).AddDays(- $Days ).ToUniversalTime().ToString(' s' )
25
+ EndDate = (Get-Date ).ToUniversalTime().ToString(' s' )
26
+ }
21
27
}
22
28
23
29
if (! [string ]::IsNullOrEmpty($Request.Body.recipient )) {
You can’t perform that action at this time.
0 commit comments