Forum Discussion

dmarquesgn's avatar
dmarquesgn
Iron Contributor
Dec 22, 2022

Exchange Online email counting report

Hi,

I'm trying to work on some monthly statistics for our company, where I could set a schedule task with powershell to get this data monthly. First of all, I would like to extract the total number of emails (received and sent) over the last 30 days.

I've been looking at the ExchangeOnlineManagement Module, and from what I can see, I would need to use the "Start-HistoricalSearch" to be able to retrieve emails. But I don't want to create a CSV of all emails, I just want as a result the total number of emails, but I can't seem to be able to do something like.

Has anyone had the same need or can help me understand how can I reach this goal?
Thanks

Resources