PhoneGet Quote
US Sales: +1 888 720 9500
US Support: +1 844 245 1108
Intl: +1 925 924 9500
Aus: +1 800 631 268
UK: 0800 028 6590
CN: +86 400 660 8680

Direct Inward Dialing: +1 408 916 9890


PowerShell script to fetch Office 365 mailbox traffic reports

IT admins often use PowerShell scripts to retrieve details on Office 365 mailboxes, inbound/outbound mail traffic, and more. Below are some PowerShell scripts used on Office 365 mailboxes.

Inbound mail traffic report

Get-MailTrafficReport -Direction Inbound -StartDate 06/13/2019 -EndDate 06/15/2019

This PowerShell cmdlet fetches the details of incoming messages between June 13, 2019 and June 15, 2019. However, it cannot fetch data older than 180 days.

Outbound mail traffic report

Get-MailTrafficReport -StartDate 6/12/2019 -EndDate 6/12/2019 -Direction Outbound | Format-Table Domain,Date,EventType,Action,MessageCount

This PowerShell cmdlet fetches the statistics on outgoing messages on June 12, 2019, and displays the results in a table. Every unique combination of EventType and Action is displayed in a separate row in the table.

Spam recipient mail traffic report

Get-MailTrafficSummaryReport -Category TopSpamRecipient -StartDate 06/13/2019 -EndDate 06/15/2019

This PowerShell cmdlet fetches the mailboxes that received the most spam between June 13, 2019 and June 15, 2019.

Mailbox size report

Get-MailboxStatistics -Identity John

This PowerShell cmdlet fetches the size of the user John's mailbox, the number of messages it contains, and the last time it was accessed.

O365 Manager Plus' pre-configured reports to the rescue

ManageEngine O365 Manager Plus, the Office 365 reporting, auditing, monitoring, and management tool, is loaded with more than 700 pre-configured reports on Azure AD, Exchange Online, Skype for Business, Yammer, and other Office 365 services.

O365 Manager Plus' mailbox traffic reports provide detailed insights on your organization's Office 365 mailbox traffic. It offers valuable information including the volume of spam entering and leaving the organization's mailbox, the list of users who send and receive the most emails, and the users who receive the most spam and malware.

How do these reports help IT admins?

Mailbox traffic reports can help you detect any anomalies in email activity, and identify if they originated from or were delivered to a particular mailbox.

You can also export all these reports to PDF, HTML, CSV, and XLS formats, and schedule them to be generated and emailed to you at designated intervals.

Reports in this category include

  1. Email traffic summary
  2. Email activity
  3. Top sender
  4. Top receiver
  5. Top spam recipients
  6. Top malware recipients
  7. Detailed email traffic
  8. Mailbox size reports
  9. Mailbox content reports

The highlights of O365 Manager Plus' reports:

  • Advanced filters: Use attribute and condition-based filters to get the data you need without lengthy PowerShell scripts.
  • Reports on historical data: PowerShell cmdlets can only retrieve data that's atleast seven days old and no older than 180 days. But O365 Manager Plus reports can fetch all data right from the date of installation.
  • Customizable dashboard: O365 Manager Plus dashboard is customizable. Add reports in graph format to provide a quick peek at the mail traffic summary, top email senders and receivers, client device usage, and more. This dashboard can be embedded in any of your webpages to enable constant monitoring.
  • Report scheduler: Reports can be scheduled to be generated at regular intervals to reduce the overhead of generating reports manually.
  • Export report: The reports can be exported to PDF, XLS, HTML, or CSV formats and emailed to the administrator.
  • Secure delegation: Securely delegate the task of report generation to technicians and IT staff without giving them full access to the Office 365 Admin Center.
A holistic Office 365 administration solution