question

Gurudas avatar image
0 Votes"
Gurudas asked Gurudas answered

Trace messages with Office 365 - exchange online powershell and GUI for a specific subject line.

Hello Team,

Greetings!

Please let me know how to trace messages with Office 365 - exchange online PowerShell and GUI for a specific subject line.

Subject: "Exchange Online daily report"

Requirement: Need to trace and delete the messages.

office-exchange-online-itprooffice-exchange-server-mailflow
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

michev avatar image
0 Votes"
michev answered

You cannot search for specific subject directly. It's a very common request, but Microsoft never addressed it. Use whatever other criteria you can find to narrow down the search scope, then filter the results client-side for the matching subject. No other way around it.
If the goal here is to delete specific message(s), you can consider using eDiscovery: https://docs.microsoft.com/en-us/microsoft-365/compliance/search-for-and-delete-messages-in-your-organization?view=o365-worldwide
Good old Search-Mailbox would also do.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Gurudas avatar image
0 Votes"
Gurudas answered

Out of random searches I got following commands for Exchange Servers. I would like to convert these commands as per office 365 Powershell commands.

Get-messagetrackinglog -Startdate -Enddate -ResultSize unlimited | where {[string]$_.recipients -like "*@gmail.com"}

Get-TransportServer | Get-MessageTrackingLog

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.