Link to home
Start Free TrialLog in
Avatar of loneieagle2
loneieagle2Flag for United States of America

asked on

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 for any guidance on this.  
Avatar of M A
Flag of United States of America image

Avatar of loneieagle2


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. 
You can use a script to delete the files older than x days
ForFiles /p "C:\Program Files\Microsoft\Exchange Server\V15\Logging" /s /d -30 /c "cmd /c del @file"

Open in new window

You can automate this by Task scheduler 

Please check this as well
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.
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.
Avatar of M A
Flag of United States of America image

Link to home
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial