question

amazumda avatar image
0 Votes"
amazumda asked ·

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.

windows-server-powershelloffice-exchange-online-itpro
10 |1000 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 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?

·
10 |1000 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.

Chris-1748 avatar image
0 Votes"
Chris-1748 answered ·

take a look of https://www.frankysweb.de/exchange-reporter-2013/

you can change ini from 7 days to 1 day

·
10 |1000 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.

LucasLiu-MSFT avatar image
0 Votes"
LucasLiu-MSFT answered ·

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:
70850-1.png

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 <>

70877-image.png

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.
70912-3.png



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.





1.png (64.8 KiB)
image.png (6.3 KiB)
3.png (14.2 KiB)
· 2 ·
10 |1000 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.

Hi @amazumda ,
Do suggestions above help? If the issue has been resolved, please click “Accept as answer” to mark helpful reply as an answer, this will make answer searching in the forum easier and be beneficial to other community members as well.

Thanks for your understanding.



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.


0 Votes 0 ·

Hi @amazumda ,
I am writing here to confirm with you how thing going now? If the above suggestion helps, please click “Accept as answer” to mark helpful reply as an answer.Your action would be helpful to other users who encounter the same issue and read this thread.
Thanks for your understanding.



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.


0 Votes 0 ·