1

what is the best practice if I want to have a retention of let say 6 months ?

I'm confused which parameter that is should/can be changes.

Get-ExchangeServer | where {$_.isHubTransportServer -eq $true} | Get-TransportServer | select Name, *MessageTracking* | ft -AutoSize

Name        MessageTrackingLogEnabled MessageTrackingLogMaxAge MessageTrackingLogMaxDirectorySize MessageTrackingLogMaxFileSize MessageTrackingLogPat                                                                                                                                h                    
----        ------------------------- ------------------------ ---------------------------------- ----------------------------- ---------------------
ExHTServer1                      True 20.00:00:00              250MB                              10MB                          D:\Program Files\M...
ExHTServer2                      True 20.00:00:00              250MB                              10MB                          D:\Program Files\M...
ExHTServer3                      True 20.00:00:00              250MB                              10MB                          D:\Program Files\M...

Thanks,

Albert

Senior Systems Engineer
  • 1,275
  • 2
  • 33
  • 62

1 Answers1

1

The MessageTrackingLogMaxAge parameter directly controls the length of time after which logs will be deleted; setting that to 180.00:00:00 will get you 6 months.

However, MessageTrackingLogMaxDirectorySize will also be a limiting factor. You will want to set the max directory size to large enough to fit all of the logs you'd like to keep, but keep the limit set to something reasonable - the last thing you want is for that drive to fill up if you have a reply-all storm.

I'd also recommend using a more robust log aggregation and search tool if you're gonna want to look at those logs; Splunk comes to mind.

Shane Madden
  • 114,520
  • 13
  • 181
  • 251