You have to be a bit more specific here, which details are you looking for exactly? There are some reports within the M365 Admin Center and the SCC that give you information around mail flow, some of these can be queried by PowerShell too so they are easy to automate - the question is are they of use to you, and if so, which ones exactly?
Script to get daily mail flow for last 24 hours
Hello Team,
I want to know if we have any script to get daily mail flow for last 24 hours for exchange online and then send an automated email to the management or admin mailbox .
Thank you for your help in advance.
3 answers
Sort by: Most helpful
-
-
Chris 651 Reputation points
2021-02-22T16:49:28.653+00:00 take a look of https://www.frankysweb.de/exchange-reporter-2013/
you can change ini from 7 days to 1 day
-
Lucas Liu-MSFT 6,161 Reputation points
2021-02-23T04:22:00.187+00:00 Hi @Amazumda ,
According to my test and research, Exchange online itself cannot realize the function of automatically sending related reports. But Exchange online can query mail flow information in the following ways:
1.You could view the email activity report in Microsoft 365 admin center:
2.You could run the following command to view the message trace, but please noted that you could 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.
Get-Messagetrace -Start <> -End <>
3.In addition, you could run the script in the following link. It will output your mail flow information within a specific period of time. You can refer to the following link for specific script usage:
Please refer to: Office 365 Reports
Please Note: Since the web site is not hosted by Microsoft, the link may change without notice. Microsoft does not guarantee the accuracy of this information.
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.