Few list of Exchange 2013 powershell commands that will be useful on daily operation for tracking email on the server end.
1.1 Email tracking using Message ID
Get-MessageTrackingLog -MessageId 'ACBE26497t3456848971C4C15BDD7F5FE439245C5EF@mail.com'
1.2 Email tracking using Start & End Date ID
Get-MessageTrackingLog
-MessageSubject "This is Test Email" -Start "04/03/2014 00:00:00" -End
"05/03/2014 00:00:00" -server Server01
1.3 Email tracking using Message Subject on single Transport Server
Get-MessageTrackingLog
-MessageSubject "This is Test Email" -Start "04/03/2014 00:00:00" -End
"05/03/2014 00:00:00" -server Server01
1.4 Email tracking using on all the Transport Server
Get-TransportService
| Get-MessageTrackingLog -MessageSubject "This is Test Email" -Start
"04/03/2014 00:00:00" -End "05/03/2014 00:00:00"
1.5 Email tracking for an specific sender email address
Get-MessageTrackingLog
-Sender "raji.s@mail.com" -Start "04/03/2014 00:00:00" -server
$server.name | ft Timestamp,Recipients, RecipientStatus, Sender -wrap
–autosize
1.6 Email tracking for an specific recipient email address
Get-MessageTrackingLog
-Recipient "mail2raji@hotmail.com" -Start "04/03/2014 00:00:00"
-server $server.name | ft Timestamp, Recipients, RecipientStatus, Sender
-wrap -autosize
1.7 Email tracking for the delivery failed messages
Get-MessageTrackingLog
-EventId FAIL -Start "04/03/2014 00:00:00" -server server01 | ft
TimeStamp,Source,EventID,Recipients,Sender,RecipientStatus -wrap
-autosize
1.8 Finding logs for distribution list expansion
foreach
($server in Get-TransportServer) {Get-MessageTrackingLog -EventId
EXPAND -Start "04/03/2014 00:00:00" -server $server.name | ft
Timestamp,Sender,RelatedRecipientAddress,Recipients,RecipientStatus
-wrap -autosize}
1.9 Find logs for messages from the last 10 minutes
foreach
($server in Get-TransportServer) {Get-MessageTrackingLog -start
(Get-Date).AddMinutes(-10) -server $server.name | ft
Timestamp,Sender,RelatedRecipientAddress,Recipients,RecipientStatus
-wrap -autosize}
1.10 Find NDR 5.4.6 routing loops in the last 10 days from all transport servers
foreach
($server in Get-TransportServer) {Get-MessageTrackingLog -resultsize
unlimited -EventId FAIL -Start (Get-Date).AddDays(-10) -server
$server.name | where {$_.RecipientStatus -like '*5.4.6*'} | ft
Timestamp,Recipients,RecipientStatus,Sender -wrap -autosize}
No comments:
Post a Comment