Hi
Here is an example which changes all paramenters at once:
Set-TransportService Mailbox_Server -MessageTrackingLogEnabled $true -MessageTrackingLogPath “M:\logs” -MessageTrackingLogMaxFileSize 30MB -MessageTrackingLogMaxDirectorySize 2.5GB -MessageTrackingLogMaxAge 365.00:00:00
The cmdlet above turns on message tracking for Mailbox_Server and sets the log storage to M:\logs. Size limit for a single log file is changed to 30 MB. It is mostly a cosmetic change, which controls the number of log files – the greater the limit, the less csv are created every day. The max directory size (before the oldest files are overwritten) is set to 2.5GB, and the log files are kept for 365 days.
Setting the –MessageTrackingLogMaxAge to 00:00:00 will let you keep message tracking logs for an indefinite period.
We could refer to this link which may be helpful to solve your problem.
https://www.codetwo.com/admins-blog/message-tracking-logs-exchange/
Please note: Information posted in the given link is hosted by a third party. Microsoft does not guarantee the accuracy and effectiveness of information.
Also, this Q&A forum is only supported by English.
Thanks for your understanding and cooperating.
If the Answer is helpful, please click "Accept Answer" and upvote it.