Home > WSUS > HOWTO: Force client to clean up WSUS and rescan

HOWTO: Force client to clean up WSUS and rescan

In a previous post (HOWTO- Resolve missing systems from WSUS console) I documented how to reset WSUS SusClientID for missing systems that are duplicated in WSUS.  However, you may not want to remove or reset this ID – it’s a good idea to periodically clean up the C:\Windows\SoftwareDistribution\Download folder.  If you have 400MB of updates on 100 systems, you’re keeping around 40GB of downloads – likely on your SAN, in your backups, as part of your replication, etc. 

It’s a pretty basic script but it’s handy to have around.  It’s nice to run after any sort of WSUS installations – be they automatic or manual. 

===== CLEAN_WSUS.BAT BEGIN =====

@echo off
REM
REM PSEXEC Usage
REM psexec @server.lst -u svcautomation -H -f -c –D \\wsusserver>\E$\admin\bin\clean_wsus.bat
REM

net stop wuauserv
rmdir /q /s C:\WINDOWS\SOFTWAREDISTRIBUTION\DOWNLOAD
net start wuauserv
wuauclt /scannow
wuauclt /detectnow
wuauclt /r /ReportNow

===== CLEAN_WSUS.BAT END =====

Advertisements
Categories: WSUS
  1. No comments yet.
  1. No trackbacks yet.

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: