July 2017
Intermediate to advanced
648 pages
31h 9m
English
Message tracking logs can be used to create some pretty advanced reports. Let's say that you want to create a report that shows the total number of messages sent from your organization per external domain. This is possible using the following command:
$report = Get-TransportService |
Get-MessageTrackingLog -EventId Send `
-ResultSize Unlimited `
-Start (Get-Date).AddDays(-30) `
Where-Object {$_.ConnectorId -eq 'Internet'}
if($report) {
$domains = $report | % {$_.Recipients | % {$_.Split("@")[1]}}
$domains | Group | Sort Count -Descending | FT Name, Count -AutoSize
}
You can see here that first, we use the Get-MessageTrackingLog cmdlet to build a report for all of the messages sent in the past 30 days using a send ...
Read now
Unlock full access