Tuesday, March 25, 2014

Find Unused Exchange Mailboxes

Every once in a while you need to identify mailboxes that are no longer in use. This PowerShell command will find any mailbox where no one has logged on to the mailbox for 60 days.

Get-Mailbox | Get-MailboxStatistics | Where-Object {$_.LastLogonTime -lt (Get-Date).AddDays(-60)}

You can use this information to further investigate whether these mailboxes are required.

If the LastLogonTime is $null (blank) it means that the user has never logged on. This is normal for shared mailboxes and resource mailboxes.

No comments:

Post a Comment