Is it possible to install windows updates from the command-line? The graphical update tool doesn't seem to work so well in Windows 7. Sometimes it does, sometimes it doesn't... My problem is that I can't see any updates when I click to see the details list. So when there are updates that are not checked off by default, I can't install them...
So, is there an other way I can get those installed?
Not sure about Windows 7, but with XP/Vista, you could run the following command to detect and download updates:
If you have issues getting it to work, check out the WSUS Wiki.
Otherwise if you have a specific update that you want, just download from the Microsoft website. If there's some problem preventing you from installing, that's the best way to find out, because the Windows Update logs are godawful to deal with.
You can use a script to check for, download and install updates synchronously. I often use a modified version of this vbscript for manual patching of Windows Core servers.
It seems to work like a charm for that but I've not tested it under Windows 7 of course. There is also a link to another article for targeting a specific update if needed.
There's also a Powershell module that exposes a similar experience.
After a quick look I also found this third party application that also uses the update API, but with some more options (though requiring you to trust third party code).
If you have to patch Windows operating systems, especailly after fresh installs, take a serious look at Offline Updater.
It uses scripts to download all the patches you suggest (so Win2000, Win XP, Win 2003, Vista, Win2008, Win2012 32 and 64 bit where appropriate), multi language, service packs, .NET frameworks, and Office patches (XP, 2000, 2003, 2007).
Once you have them all downloaded, you just update every patch Tuesday, and get only the changes. Though it does get the catalouges and they are getting longer every day (many megs now per OS/Office rev).
Once you have the files on your local machine downloaded, there is a script to make CD/DVD images of them (it will this automatically for DVD images per OS now if you would like).
What I do is use a 4GB SD memory card, in an SD card reader that honours the write protect tab. I used to use 2GB cards, but I can just barely fit Win XP and most of the Office builds on it now, so I moved on to 4GB cards.
Thus when troubleshooting a machine, I trust inserting this formerly writable device into a untrusted, possibly virus infected machine (since I know nothing about it, I assume it is infected) knowing my device is write protected.
Thus I can patch it up to date as a first step.
If you use the autorun, or launch the executable on the device (key, external HD, CD, DVD, wherever you wrote it) it starts a script that uses the Windows Update service on the local machine to apply all the updates, but instead of going across the wire to download them it just uses the local copy.
Thus it may still take 1+ hours to update a WinXP machine to the latest SP and patches, but there is zero network traffic along the way, and you can do it with the Ethernet cable unplugged entirely.
Amazingly useful tool!
Should not run afoul of Microsoft, like the AutoUpdate guys were, who were pre building a patch CD, that distributed the CD image. This tool updates scripts, and you have to go get all the patches on your licensed Windows workstation.
Windows Update from Command Line:
www.sysadminsoftware.com/udc.html
The tool (Updates Deployment Commander) can do just what you are asking for. You can also pass parameters to avoid certain patches, target specific updates, reboot N minutes after completing, create reports in CSV, and so on.. It comes with a couple of GUI utilities too.
I cannot currently add a comment to the answer by duffbeer703, so here as a separate answer:
The last "good" version of the link to the WSUSwiki as archived on The Internet Archive is this. The the options given in the original answer are described in this FAQ entry.
I do not believe so, Windows Update requires some ActiveX and other integration with Internet Explorer to work properly.
Since Windows 7 is still barely a release candidate, you should expect these kinds of bugs.
Might be wise to submit the specific bug you are having to the dev team if you are a member of MSDN.