Link to home
Create AccountLog in
Avatar of Scotch Tech
Scotch TechFlag for United States of America

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?



Avatar of DEMAN-BARCELO (MVP) Thierry
DEMAN-BARCELO (MVP) Thierry
Flag of France image

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.

ASKER CERTIFIED SOLUTION
Avatar of FOX
FOX
Flag of United States of America image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer

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>