Exchange Server 2010 – Changing Message Tracking Log Retention Period

Open the Exchange Management Shell console and determine your server’s identity and verify logging is enabled with either of these commands.

Get-TransportServer | Select Name,MessageTrackingLogEnabled | ft -auto
Get-MailboxServer | Select Name,MessageTrackingLogEnabled | ft -auto

Here you can check the current Message Logging values. It also aids in determining which switches to set.

Get-MailboxServer YourServerName | fl messagetracking*

You should see something like this…

MessageTrackingLogEnabled : True
MessageTrackingLogMaxAge : 30.00:00:00
MessageTrackingLogMaxDirectorySize : 1000 MB (1,048,576,000 bytes)
MessageTrackingLogMaxFileSize : 10 MB (10,485,760 bytes)
MessageTrackingLogPath : C:\Program Files\Exchange\TransportRoles\Logs\MessageTracking
MessageTrackingLogSubjectLoggingEnabled : True

Change your values to something more useful. In my case, space was not an issue so I enabled logging for 365 days and allocated 10 GB for log files.

Set-TransportServer YourServerName -MessageTrackingLogMaxAge 365
Set-TransportServer YourServerName -MessageTrackingLogMaxDirectorySize 10000MB

Leave a Reply

Your email address will not be published. Required fields are marked *