Automated Deletion of WSUS Logs

Rating: No reviews yet
Downloads: 130
Released: Oct 30, 2010
Updated: Nov 1, 2010 by theisdept
Dev status: Stable Help Icon

Recommended Download

Source Code AutoWSUSLogDeletion
source code, 3K, uploaded Oct 31, 2010 - 130 downloads

Release Notes

To deploy this automation

Download zip file to servers desktop

STEP I

Extract it, that will create an install folder called AutoWSUSlogdeletion on your desktop.
Open the folder

STEP II

You will need to right click and select edit on the enclosed xml file "WSUS Log file cleanup.xml".
Find the line <Author>DOMAIN\adminuser</Author>
and replace DOMAIN with you domain name ALL CAPS
then replace ADMINIUSER with you domain administrator account
Then do the same for the line
<UserId>DOMAIN\adminuser</UserId> 14 lines down
DO NOT ADD ANYTHING ELSE TO THE EML FILE - IT WILL CAUSE ERRORS

STEP III

Now open the Task Scheduler
and in the left colum under the Microsoft - Windows folders, create a new folder called WSUS Cleanup.
Select that folder in the left colum and then in the far right colum click import
Then navigate to the folder "C:\Program Files\Windows Small Business Server\WSUS Log File Cleanup"
Now select the "WSUS log file cleanup.xml" file and click open
Adjust the settings to your prefered configuration, times and day/date to run.

STEP IV

Now next step is to edit the powershell file to match your folder names in the C:\inetpub\logs\LogFiles directory
In the AutoWSUSlogdeletion folder on the desktop right click on the "DeleteOldFiles.ps1" file
Select Open to open in notepad to edit
OR
Select Edit to edit with the Powershell GUI editor
In the file you will find a Function section for each folder that exists
They each begin Function DeleteOldLogFileinFolder1 - Number 1 - 8
In each of the section you need to edit the line
$TargetFolder = "C:\inetpub\logs\LogFiles\W3SVC1"
To match the name of your folders (these are all crated with random names by WSUS install.

STEP V - Last step

Then right click on the install.bat and run as administrator. It will create a directory and copy the files
you've just edited, for the automated task
to - "C:\Program Files\Windows Small Business Server\WSUS Log File Cleanup"*_

And you finished.

Reviews for this release

No reviews yet for this release.