Scheduled Task to Remove Old IIS Logs for WSUS has been Updated for SBS 2008 and SBS 2011 Standard

[Today's post comes to us courtesy of John Bay from Commercial Technical Support]

One of the problem areas in Small Business Server 2008 is the amount of disk space consumed by the WSUS IIS Log; files for reference see: Recovering Disk Space on the C: Drive in Small Business Server 2008. To help ease this problem, Small Business Server 2011 Standard has a scheduled task that will automatically remove any IIS logs associated with the WSUS Administration Website. The scheduled task is named WSUSLogCleaner and is located in the Task Scheduler Library under Microsoft > Windows > Windows Small Business Server 2011 Standard.

The scheduled task runs a VBScript named WBSLogCleaner.VBS. This script takes an argument which is number of days of log files to keep.

clip_image004

By default, on Small Business Server 2011 Standard, this value is set to 100. The value can be reduced if necessary. The script will run every night and will remove any IIS log file associated with the WSUS administration website that is older than 100 days.

Small Business Server 2008 Update Rollup 5 was released In January 2011. This update rollup installs and configures the same scheduled task as in SBS 2011 Standard. In SBS 2008, the scheduled task is configured by default to use an argument of 30 so it will only keep 30 days of log files.

The script will log the results of the execution in the following file: c:\program files\windows small business server\logs\wsuslogcleaner_script.log

In some cases, the script may be unable to locate the WSUS administration website. If this happens, the script will fail to cleanup any of the WSUS IIS log files and will log the following error in the wsuslogcleaner_script.log file:

1/26/2011 3:13:09 PM Start deleting WSUS logs
1/26/2011 3:13:09 PM Failed : Invalid index. (-2147352565)

We have recently published a KB article with an updated version of the wsuslogcleaner script that corrects this problem. To resolve this issue, follow the steps from the following link to replace the old wsuslogcleaner script with the new version:

https://support.microsoft.com/kb/2538579