Wednesday, February 28, 2007

Get all SUS or WSUS updates

So, you use SUS or WSUS to update your workstations? What if you wanted to quickly update a new system with the latest patches?

You could use a little script like this:
@echo off
net stop wuauserv
REG DELETE "HKLM\Software\Microsoft\Windows\CurrentVersion\
WindowsUpdate\Auto Update" /v LastWaitTimeout /f
REG DELETE "HKLM\Software\Microsoft\Windows\CurrentVersion\
WindowsUpdate\Auto Update" /v DetectionStartTime /f
Reg Delete "HKLM\Software\Microsoft\Windows\CurrentVersion\
WindowsUpdate\Auto Update" /v NextDetectionTime /f
net start wuauserv
wuauclt /detectnow

If Windows Update 3.0 is not installed on this system you may need to run the script and wait until the system wants to reboot. Then you run the script again.

No comments: