Wsus cleanup script

For those of you with Wsus, you know my pain.

Ever notice how some pc’s just constantly seem to think they have just updated? when in essence they havent reported status in four months???
i see it more frequently in windows 2000, but it does happen on XP.

to fix this issue heres what i do:

a simple batch file generally fixes the problem without too much hassle

    net stop bits
net stop wuaserv
rename %systemroot%\windowsupdate.log windowsupdate.old
rd /s /q %systemroot%\softwaredistribution
regsvr32 Inseng.dll /s
regsvr32 Oleaut32.dll /s
regsvr32 Ole32.dll /s
regsvr32 Urlmon.dll /s
regsvr32 Mssip32.dll /s
net start wuauserv
wuauclt /detectnow

the script:

  • stops the services
  • renames the log file
  • deletes the download folder and its contents
  • re-registers the required dll’s
  • starts the update service
  • and forces an update

towards the end you can either call a windows update (wuauclt /detectnow) or alternatively you can use a wsus update forcer script.

hope it helps 😉

  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: