#Exchange 2010 Oldest Email

#Exchange2010 #Powershell

How kewl is this.  So I wanted to know the oldest email on Exchange 2010, so I ran this:

Get-mailboxdatabase | Get-mailbox | Sort Name | ForEach{$s=$_.SamAccountName;Get-MailboxFolderStatistics $s -IncludeOldestAndNewestItems | sort OldestItemReceivedDate | where {$_.OldestItemReceivedDate -ne $null} | select Identity,OldestItemReceivedDate -First 1}

And the winner was 1997!

3 thoughts on “#Exchange 2010 Oldest Email

  1. Appears to have worked on Exchange 2007 as well, although it’s showing Contacts and Calendar Items, too.
    Thanks!

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 )

Google photo

You are commenting using your Google 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