#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!