Get list of dormant mailboxes using Powershell

A quick Powershell command that returns a list of all the mailboxes on your Exchange server not accessed in 90 days

Get-MailboxStatistics | where {$_.Lastlogontime -lt (get-date).AddDays(-90)}| Select displayName,LastLoggedOnUserAccount,LastLogonTime

You could also write the results to a csv using the Export-CSV cmdlet :-

Get-MailboxStatistics | where {$_.Lastlogontime -lt (get-date).AddDays(-90)}| Select displayName,LastLoggedOnUserAccount,LastLogonTime | Export-CSV c:\NoLogon30Days.csv

About markholmes28
Systems administrator at a well known UK University. Skills include VMWare ESX, Active Directory, Windows Server, Linux

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.