Advertisements

Manage Storage of IIS Log Files – Scheduled Deletion of IIS Logs

Drive Space Full with IIS Log Files / Reclaim Disk Space

Are your Local Drives of your IIS Server running out of space? Have you checked the size of your IIS Logs?

If your IIS was setup by a professional; you would not have to go through this issue. The log files would have been managed appropriately

Ideally I do not see a purpose to keep IIS Log files beyond a period of 1 month. Those older than one month should ideally be removed to prevent disk space issues

I found below posts which will assist you. Before you use the below scripts; please identify the location of your log files

Using Powershell

http://www.codeproject.com/Articles/663000/Simple-Powershell-script-to-clean-up-IIS-log-files

Using VBScript

http://www.iis.net/learn/manage/provisioning-and-managing-iis/managing-iis-log-file-storage#02

By default; you would find them on C:\inetpub\logs\LogFiles\

To verify the location; open IIS and select the Default Website and click Logging

IIS_Screenshot

Take note of the path mentioned in the directory field

IIS_Logging

Advertisements

About Sunil Padmanabhan

An Indian based out of Dubai who started traveling from 2011 and pretty much caught the travel bug. Every year presents itself as an opportunity to visit and explore a new place.

Posted on March 16, 2015, in IIS, Powershell, Windows and tagged , , . Bookmark the permalink. Leave a comment.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: