PowerShell Exchange message tracking commands

Here's the powershell commands you'll need for doing some message tracking in Exchange.

-Get message tracking logs:

get-messagetrackinglog -Sender "" -Start "4/28/2015" -End "4/30/2015" | Select-Object Timestamp,ServerHostname,ClientHostname,Source,EventId,Recipients | Sort-Object -Property Timestamp

-Get failed emails:

Get-TransportServer | Get-MessageTrackingLog -ResultSize Unlimited | ? {$_.EventID -eq "DSN" -OR $_.EventID -eq "FAIL"} | Select *, {$_.Recipients} | Export-CSV D:\FailedEmails.csv -NoType

-Failed emails for today:

get-messagetrackinglog -Sender "" -Start "4/28/2015" -End "4/30/20
| Select-Object Timestamp,ServerHostname,ClientHostname,Source,EventId,Recipients | Sort-Object -Property Timestamp