Exchange 2016 IIS Log files fill the disk

LMS 156 Reputation points
2021-03-02T06:43:48.683+00:00

Hi

Once every 4-5 days we have to clear the log files manually from C:\inetpub\logs\Logfiles\W3SVC1 & W3SVC2, how can we fix this issue either by reducing the events to be logged or by configuring automatic truncation of log files.

Thanks in advance

Exchange | Exchange Server | Management
0 comments No comments
{count} vote

2 answers

Sort by: Most helpful
  1. Ashok M 6,846 Reputation points
    2021-03-02T07:16:24.983+00:00

    Hi @LMS ,

    You can create the VB script and schedule it to delete the logs files after specific days. Please refer below,

    https://learn.microsoft.com/en-us/iis/manage/provisioning-and-managing-iis/managing-iis-log-file-storage#delete-old-log-files-by-script

    If the above suggestion helps, please click on "Accept Answer" and upvote it.

    1 person found this answer helpful.

  2. Kael Yao 37,746 Reputation points Moderator
    2021-03-03T03:18:11.787+00:00

    Hi, @LMS
    The recommended way is to regularly clear the old IIS logs as the logs may be helpful in troubleshooting.
    If you would like to limit the IIS logs, I suppose you may custom the W3C logging fields in IIS .
    73536-55.png
    Here is also a IIS document for your reference: Configure Logging in IIS


    If the response is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.