Exporting Sent and received count for exchange online users through powershell

Aran Billen 866 Reputation points
2024-11-27T12:53:52.6333333+00:00

Hi all,

is it possible to generate a report from Office 365 using PowerShell that details the total number of emails sent and received by each user over the past 30 days, specifically for users with a license containing "faculty"

Microsoft 365
Microsoft 365
Formerly Office 365, is a line of subscription services offered by Microsoft which adds to and includes the Microsoft Office product line.
5,274 questions
Microsoft Exchange Online
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,676 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Vasil Michev 109.7K Reputation points MVP
    2024-11-27T16:43:07.5933333+00:00

    There's a built-in report for that: https://learn.microsoft.com/en-us/microsoft-365/admin/activity-reports/email-activity-ww?view=o365-worldwide

    You can simply use the Export functionality in the portal, then filter the report in Excel. Or you can get the report data via PowerShell and the Get-MgReportEmailActivityUserDetail cmdlet. No server-side filtering is supported, so as with the portal, you will have to apply the filter client-side.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.