Managing log files

By default, IIS is configured to create a separate log file for each day. Unlike many other applications such as Exchange, IIS does not contain a native method of maintaining the number or size of the log files.

As IIS saves log files, the log files' sizes and number can quickly grow out of control. For instance, a web server that has been in production for a year can have 365 log files (one for each day) or more. A busy website or web service can potentially fill the OS drive of a server within a few weeks or months.

While this is a great repository of information, we don't want our logging to negatively impact the server. Chances are that if we need to review the files, we will only need the last few days or few weeks of files, ...

Get Windows Server 2012 Automation with PowerShell Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.