WSUSLogCleaner failure 2147942402
There are many articles regarding how to locate and regain space consumed by many SBS services and log files, including one of my own; “Missing SBS 2008/2011 Drive Space“. One of the most common issues is the WSUS admin logs located in C:\inetpub\logs\LogFiles\W3SVC_____ which can consume huge amounts of drive space. With SBS 2011 and SBS 2008 (2008 if updates are applied) this particular folder should be looked after by a scheduled task which clears out log files older than 100 days. In a few cases you may want to edit this and reduce it to a shorter period of time, as very nicely explained by Ronny Pot.
I was asked to look at an SBS server today which had ‘lost’ most of its system partition available space. It was not really lost as it was found in a C:\inetpub\logs\LogFiles\W3SVC_____ folder. However, this should have been looked after by the aforementioned scheduled task. Upon review of the task history it seems the task’s script has been failing for several months resulting in “Action start failed” and “Action failed to start” messages with an Error Value of 2147942402.
Note: the task is located under Administrative Tools | Task Scheduler | Task Scheduler Library | Microsoft | Windows | Windows Small Business Server 20xx Standard | WSUSLog Cleaner
In this case the time frame had been reduced to 30 days, but noticed when saving the changes, if not paying attention, the “arguments” for the script can get modified by Windows. The changes can be made under the Actions tab as per the image below:
However, in some but not all cases, when clicking OK to save you may get a popup as below:
Note the text. If you select yes it changes the Program/Script field to C:\Program, and the Argument field to Files\Windows Small Business Server\Bin\WSUSLogCleaner.vbs 30. The entire path needs to be in the Program/Scripts field and only 30 in the argument. It seems someone in a hurry clicked yes, as one would assume when approving changes, and did not double check after the fact. It seems the popup only occurs if there are no existing quotes around “C:\Program,Files\Windows Small Business Server\Bin\WSUSLogCleaner.vbs” in the Program/Scripts field.