PowerShell » Get-MailboxStatistics

Find Inactive Exchange Mailbox Using PowerShell

Your download is in progress and it will be complete in just a few seconds! If you face any issues, download manually here
Stay informed about Exchange with
Exchange Reporter Plus
  • Please enter business email address
    By clicking 'Proceed to Download', you agree to processing of personal data according to the Privacy Policy. You can unsubscribe from our mails at anytime.

Exchange Online Reports

You can use the Get-MailboxStatistics cmdlet along with suitable parameters to fetch the list of inactive Exchange mailboxes. You can also specify the period of inactivity as required.

Example for using Get-MailboxStatistics cmdlet to find inactive mailboxes:

Get-Mailbox -ResultSize Unlimited | Get-MailboxStatistics | Where{$_.Lastlogontime -lt (Get-Date).AddDays(-90)} | Select DisplayName, LastLoggedOnUserAccount, LastLogonTime

Using this cmdlet, you can find out all users last logon time. If the last logon date is 90 days prior to the execution of this cmdlet, the mailbox will be listed as inactive with the DisplayName, LastLoggedOnUserAccount and LastLogonTime details.

Find inactive mailboxes without PowerShell easily!

List of Inactive mailbox reports available:

For Exchange Server:

  • Inactive Mailboxes by Last Sent Mail
  • Inactive Mailboxes by Last Received Mail
  • Inactive Mailboxes by Last Logon Time

For Exchange Online:

  • Inactive Mailboxes
  • Inactive Shared Mailboxes


Steps for generating inactive mailboxes report in Exchange Reporter Plus:

    • Go to the Reporting tab on the top pane.
    • Navigate to Exchange Server > Mailboxes > Account Status Reports.

    Note: Or navigate to Exchange Online > Mailbox Reports > General Mailbox Reports. (for Exchange Online).

    • Enter the name of the Exchange organization or Office 365 tenant.
    • Select the period for which you want to check if the mailboxes were inactive.
    • For Exchange Online, select the domains or groups for which you want to generate the report and click on Generate Now.


Why choose Exchange Reporter Plus reports over PowerShell codes?

    • Report Scheduling:  Schedule reports to generate them automatically and send them to concerned authorities such as IT admins and managers through email.
    • Quick access and export options: Add reports as favourites to access them easily and export reports to different file formats such as PDF, HTML, XLS and CSV.
    • Filter and alerting options: Add or remove columns from the report generated to view information relevant to your needs. Use advanced filters options available to customize your search and configure alert profiles for specific actions to get real-time updates.
    • Technician Delegation: Delegate different reports to different technicians. Have control over who gets access to what. You can also protect your reports with passwords.
    • Easy-to-analyse reports: Generate reports on periodic basis, per domain basis, tenant-wise or get an overall summary as you choose. Get graphical and dashboard representation of complex analytical data.
    • Log Forwarding to SIEM solutions: Integrate with other SIEM solutions such as splunk and syslog and forward logs to them for analytical purposes.

Click here to learn more about how Exchange Reporter Plus simplifies complex Exchange and PowerShell tasks.

Office 365 Security Reports Office 365 Health Monitoring Exchange Audit Logs Skype for Business Reports