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 scripts for Exchange Online reports

Email is the most used form of business communication. Important details like client information, project files, and transaction information are often exchanged via email, making employees’ mailboxes some of the most targeted entities by hackers. To ensure mailboxes are secure, IT admins often use PowerShell scripts to retrieve details on Exchange Online mailboxes, mail traffic, mailbox sizes, and more. Below are some PowerShell scripts used to get information on Exchange Online mailboxes.

All mailboxes report

Get-Mailbox -ResultSize unlimited

This cmdlet lists all the Office 365 mailboxes in the organization.

SendAs permission report


This cmdlet shows which users have SendAs permissions configured.

Mail traffic report

Get-MailTrafficReport -Direction Inbound -StartDate 05/15/2019 -EndDate 05/30/2019

This cmdlet retrieves statistics on all incoming messages between May 15, 2019 and May 15, 2019.

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

This cmdlet retrieves statistics on all outgoing messages on May 15, 2019. Every unique combination of EventType and Action is displayed in a separate row in a table.

Mailbox size report

Get-MailboxStatistics -Identity John

This cmdlet retrieves the size of the mailbox owned by the user John, the number of messages it contains, and the last time it was accessed.

O365 Manager Plus' preconfigured reports

It's true that PowerShell scripts can fetch data that the Office 365 admin center cannot. However, as you can see in some of the examples above, the more granular the data you need is, the longer the PowerShell scripts get. IT admins have to take care of the code syntax, figure out which parameters to use, and verify the correctness of the code manually before executing it; this adds to operational overhead, requiring more work hours.

O365 Manager Plus, our Office 365 reporting, auditing, monitoring, and management tool, comes with over 700 preconfigured reports on Exchange Online, Azure AD, Skype for Business, OneDrive for Business, Yammer, and other Office 365 services.

Exchange Online reports

O365 Manager Plus provides many important reports on Exchange Online which are grouped in the following categories:

Advantages of O365 Manager Plus’ reporting

Advanced filters: Use property and condition-based filters to retrieve the data you require without using lengthy PowerShell scripts.

Historical data: PowerShell cmdlets retrieve data no older than seven to 180 days, but O365 Manager Plus can report on all data from the date of installation.

Embeddable dashboard: With O365 Manager Plus' customizable dashboard, you can add graphs showing the mail traffic summary, top email senders and receivers, client device usage, and more for a quick peek at important mailbox details. The dashboard can be embedded in any of your webpages for constant monitoring.

Scheduled reports: Generate reports at regular intervals to reduce the overhead of manual report generation.

Multiple export options: Export reports to PDF, XLS, HTML, or CSV formats, and email them to administrators.

Report 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