Basic Options

Switch Reference


/help

Displays the full usage reference.


/search

Searches for available updates via the Windows Update API. The default criteria — when no /criteria is specified — is IsInstalled=0 and Type='Software'. Drivers are excluded by default.

WuInstall automatically detects whether a WSUS server is configured and routes the search accordingly:

You are using WSUS Server http://wsus.mycompany.local:8530

You have no WSUS Server configured

Use /bypass_wsus or /use_wsus to override this behavior for the current run.

Search flow:

  1. Search executes and prints the active criteria
  1. If the criteria string is invalid → exits with code 4
  1. If the search fails, WuInstall retries once automatically. On second failure → exits with code 1 and prints the error code
  1. If no updates are found → exits with code 2
  1. Matching updates are filtered (see /severity, /classification, /product, /match, /nomatch, /matchfile, /nomatchfile, /isdownloaded)
  1. If no updates pass the filters → exits with code 3
  1. Matching updates are listed with name, severity, classification, and product
  1. Exits with code 0 — no further action taken

Useful for auditing available updates, checking installed updates with /criteria "IsInstalled=1", or validating filter logic before running a live install.


/download

Runs a full search (identical to /search, with all specified criteria and filters), then downloads all matching updates — either from WSUS or Windows Update directly.

  • Downloads follow the same order as the search result list
  • Already-cached updates are skipped automatically (see /isdownloaded)
  • Progress can be tracked with /show_progress
  • Cache location: Windows\SoftwareDistribution\Download
  • If any download fails, WuInstall prints the error code and exits with code 1 immediately — remaining downloads are cancelled
  • On success → exits with code 0

/download_to "C:\path"

Behaves identically to /download, but additionally copies the downloaded installation files (.exe / .msi) to the specified directory for manual installation or distribution to other machines.

Key behaviors:

  • Most updates are bundles containing multiple sub-updates, each producing a separate installation file — expect more files than updates
  • Copy failures are non-fatal: WuInstall logs the error code and continues with the next update
  • Can be combined with /isdownloaded 1 to copy already-cached updates to a directory without re-downloading

/install

Runs a full search and download, then installs all matching updates in a single pass. Before installing, WuInstall validates that each update downloaded correctly and checks EULA status (see /autoaccepteula for unattended use).

Install flow:

  1. Updates are listed with EULA status
  1. Installation runs in one step; progress trackable with /show_progress
  1. If installation fails → exits with code 1 and prints the error code
  1. On completion, results are enumerated per update with individual and overall result codes
  1. WuInstall checks if a reboot is required:
      • Reboot required → exits with code 10
      • No reboot required → exits with code 0

/uninstall

Uninstalls updates from the current machine. Searches offline for installed updates (IsInstalled=1) and uninstalls those matching the specified filters. All standard filter switches apply (/match, /severity, /product, etc.).

wuinstall /uninstall /match "KB2251419"

⚠️ Running /uninstall without any filter options is strongly discouraged — it will attempt to uninstall all installed updates.

Limitations:

  • Only works with updates that were installed via WSUS. Attempting to uninstall non-WSUS updates returns error 0x80240028 – WU_E_UNINSTALL_NOT_ALLOWED
  • Some updates cannot be uninstalled due to internal dependencies
 
Did this answer your question?
😞
😐
🤩

Last updated on January 3, 2024