asked on
Exchange 2016 - Script needed - Search List of Email addresses against Transport logs
I am cleaning up empty DL's, but first I need to check if any of the DL's had an email sent to it in the past 90 days.
I have a list of the empty DL's, and can put that in a variable if needed. I want to run each DL against the transport logs to see if they are listed as a recipient.
How can I do this?
By default, tracking logs are only kept for 30 days maximum, depending on the place used.
You can use this command to change the MessageTrackingLogMaxAge to keep more days, and the MessageTrackingLogMaxDirectorySize to have more than 1 GB allocated.
Set-TransportService [<ServerIdentity>] -MessageTrackingLogEnabled <$true | $false> -MessageTrackingLogMaxAge <dd.hh:mm:ss> -MessageTrackingLogMaxDirectorySize <Size> -MessageTrackingLogMaxFileSize <Size> -MessageTrackingLogPath <LocalFilePath> -MessageTrackingLogSubjectLoggingEnabled <$true | $false>
Hello,
you can search directly in the folder "C:\Program Files\Microsoft\Exchange Server\V15\TransportRoles\Logs\MessageTracking".
But, you will not have 90 days, unless you have a backup of the files.