PowerShell scripts for Microsoft 365

Your download is in progress and it will be complete in just a few seconds! If you face any issues, download manually here

Thank you for registering with ManageEngine.

We will send the download link to the registered email ID shortly.

Manage and Secure Microsoft 365 with M365 Manager Plus

  •  
  •  
  •  
  • By clicking 'Download 30-day free trial' you agree to processing of personal data according to the Privacy Policy.

PowerShell script to fetch Microsoft 365 mailbox traffic reports

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

Inbound mail traffic report

Get-MailflowStatusReport -Direction Inbound -StartDate 06/13/2022 -EndDate 06/15/2022

This PowerShell cmdlet returns the message count between June 13, 2022, and June 15, 2022. However, it cannot fetch data older than 180 days.

Outbound mail traffic report

Get-MailflowStatusReport -StartDate 6/12/2022 -EndDate 6/12/2022 -Direction Outbound | Format-Table Date,EventType,MessageCount

This PowerShell cmdlet fetches the statistics on outgoing messages on June 12, 2022 and displays the results in a table. Every unique combination of EventType 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.

M365 Manager Plus' pre-configured reports to the rescue

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

M365 Manager Plus' mailbox traffic reports provide detailed insights on your organization's Microsoft 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 XLSX formats, and schedule them to be generated and emailed to you at designated intervals.

Reports in this category include

  • Email traffic summary
  • Email activity
  • Top sender
  • Top receiver
  • Top spam recipients
  • Top malware recipients
  • Detailed email traffic
  • Mailbox size reports
  • Mailbox size reports

The highlights of M365 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 M365 Manager Plus reports can fetch all data right from the date of installation.

Customizable dashboard: M365 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, XLSX, 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 Microsoft 365 Admin Center.

Why businesses choose M365 Manager Plus?

What our customers say

  • We can now effectively reconcile which licenses we are using in the organization and assign the cost to the business unit. We were also able to identify a number of license changes that could be put in place that reduced our total Microsoft 365 spending.

    Timothy Ransom
    Group IT/IS manager at The Eclipse Group, United Arab Emirates

  • M365 Manager Plus is valuable to our future business and, most importantly, it allows me to keep improving the level of service we provide.

    IT infrastructure manager
    Sunstar Suisse S.A.

  • Our firm purchased ManageEngine M365 Manager Plus to help us protect our business from email-borne cyberthreats. We are absolutely satisfied with the features and ease of use. It has surpassed our expectations.

    Insurance agent
    Security and risk management Gartner review

A holistic Microsoft 365 administration solution

One-stop solution for all your
Microsoft 365 administration needs!

Download now