How do I manage logs in the LOGGING folder of Exchange Server 2016
What is the best way to manage the logs files in Exchange Server 2016? I'm not referring to the log files in the Mailbox folder which are managed when the mailbox is backed up. I mean the LOGGING folder which has 80 folders with various types of logs. So specifically, is there settings in Exchange to limit the size or dates of these? Can all of the logs in these folders be purged after a set time period, which I can do with a script? Or do some of them need to be kept indefinitely? I have found a little about this that says certain of the folders inside the LOGGING folder can have the contents deleted, but I'm wondering about doing all of them.
Thanks MAS, but that does not answer my question. The automation is for IIS log files which we already maintain with a script. The second part of your answer is for the Database Logs which get purged by our Exchange aware backup.
I am asking about the log files in C:\Program Files\Microsoft\Exchange Server\V15\Logging.
M A
You can use a script to delete the files older than x days
MAS So it looks like the answer to my question is that I can delete all the old log files from the LOGGING folder without breaking anything.
Lee W, MVP
As a general rule, DON'T DELETE (at least at first). MOVE. You can always move back. Move and if in 3 months no unusual behavior is observed, you know you can delete.
https://practical365.com/powershell-script-iis-logs-cleanup/
Or change the location.
https://www.experts-exchange.com/articles/31688/Move-Mailboxdatabase-and-other-logs-to-different-drive-in-Exchange-2013-2016-2019.html