Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

If a Windows server (2k3/2k8) is set to "download but not install" updates, is there a way to check from the command line.. perhaps a log file or something I can check with powershell, to see if there are any updates actually waiting to be installed? I'm trying to prevent having to manually log on to each server to check, even though they want the "trigger" pulled manually. We have an automation system in place I can use (CA Autosys) - just not sure what to have it look for.

share|improve this question
Please don't crosspost. Pick the best site, and the thread will be migrated if needed. – Zoredache May 10 '10 at 17:33
up vote 3 down vote accepted

We can use IUpdateSearcher::Search to determine the number of yet to be installed updates:

$session = New-Object -com "Microsoft.Update.Session"

$searcher = $objSession.CreateUpdateSearcher()

$results = $"IsInstalled=0")


If you need to do installation by another script, assign the above variables first and add:

$installer = New-Object -com "Microsoft.Update.Installer"

$installer.Updates = $results.updates

foreach ($update in $objresults)
share|improve this answer
Possibly worth adding IsAssigned=1 and IsHidden=0 to the search criteria depending on what the OP is looking for. – vmrob Nov 11 '14 at 21:46
$installer = New-Object -com "Microsoft.Update.Installer" - that does not look familiar to me. What language is that? – jww Mar 27 '15 at 6:21

take a look at

From their site - "WuInstall is a command line tool for Windows which enables you to install Windows updates for a certain workstation in a controlled way by using a command line script instead of the standard Windows update functionality."

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .