Today I had an interesting issue where a particular server’s WSUSContent folder increased in size incredibly quickly to the point where the logical disk it was hosted on ran out of space. This server was running Windows Server 2003.
There is a handy utility, WSUSUtil.exe, which allows IT administrators to reset the WSUS components and rechecks each update in the database, verifying the content is present in the WSUSContent folder and downloads it again if necessary from Microsoft.
Although this allows you to set a clean slate for WSUS, there must be a reason why your WSUSContent folder increased in size so quickly in the first place. It’s important to find this out before doing any reset, or else you will be needlessly re-downloading the exact same data again.
What to Check
Update Files & Languages – This should be the first port of call. Ensure you are downloading only the updates your network needs. If you had a setting selected before but turned it off at a later date (such as ‘All Languages’ instead of just ‘English’), they will still be present in the WSUSContent folder – there is no automatic deletion process.
WSUS Downstream Servers – Ensure that the downstream servers are configured correctly – remember settings set here can also affect what your upstream WSUS server downloads, even if the settings between the servers are different.
Download Files Only When Updates are Approved – In an ideal world, IT admins should always test updates before rolling out onto client computers. If this option in WSUS is not checked, then all updates that are synced are downloaded. Of course you then need to approve any applicable updates after setting this.
Even with the correct settings applied, WSUS can have many GBs of data stored. The Server Cleanup Wizard can help as it does offer to delete any ‘expired’ updates, but it doesn’t perform all the magic that’s required.
I Found My Issue – How Do You Do a Reset?
- Correct any settings above or disapprove any unneeded updates.
- Close any open WSUS consoles on that server for all sessions currently logged on.
- Go to Administrative Tools – Services (or run ‘services.msc’) and STOP the Update Services service.
- In Windows Explorer browse to the WSUSContent folder (typically D:\WSUS\WSUSContent or C:\WSUS\WSUSContent)
- Delete ALL the files and folders in the WSUSContent folder.
- Go to Administrative Tools – Services (or run ‘services.msc’) and START the Update Services service.
- Open a command prompt and navigate to the folder: C:\Program Files\Update Services\Tools.
- Run the command ‘WSUSUtil.exe RESET’
As you are downloading a lot of updates again, it can take a few hours for the process to fully complete – be patient!
How do you tell when the process is complete?
You can check by ensuring the WSUSContent folder is not growing, or you can check the SoftwareDistribution.log, which is located:
C:\Program Files\Update Services\LogFiles\SoftwareDistribution.log
When you start the reset command, you should see a line towards the bottom of the log similar to this:
After waiting for some time, check the log again and search for the text “State Machine Reset Agent Finished”
WsusService.13 ExecutionContext.runTryCode State Machine Reset Agent Finished
I hope this has helped you! Any questions, just drop a comment below.