As an IT administrator, it is essential to keep your Windows servers and workstations up-to-date with the latest security patches and software updates. While Windows provides some tools for managing updates, such as the Windows Update service and the Microsoft Update Catalog, there are often times when it is necessary to manually search for and install updates from the command line.
Fortunately, Microsoft has provided some powerful command-line tools for doing just that, which can make managing updates on multiple systems much easier. In this article, we will explore the different tools and commands available for searching and installing Windows updates from the command line.
The Windows Update Command-Line Tools
The Windows Command-Line Interface (CLI) provides a set of command-line tools for managing updates. The most important of these is the Windows Update Agent (WUA), which is used to search for, download, and install updates. The WUA can be used to search for both Windows and Microsoft product updates, and it also provides support for installation packages in both MSI and MSU format.
The WUA is included with the Windows operating system, but it can also be downloaded separately from the Microsoft Download Center. Once the WUA is installed, you can use the “wuauclt.exe” command to search for and install updates. For example, the following command will search for all available updates:
wuauclt /detectnow
To install all available updates, you can use the “wuauclt /updatenow” command. You can also specify particular updates to install with the “/i” argument, followed by the update name or ID.
The Windows Update Command-Line Tool (wucltui.exe)
The Windows Update Command-Line Tool (wucltui.exe) is another command-line tool that can be used to search for, download, and install Windows updates. This tool has a more user friendly interface than the WUA, and can be used to search for both Windows and Microsoft product updates.
The Windows Update Command-Line Tool can be downloaded from the Microsoft Download Center, and the “wucltui.exe” command can be used to search for updates. For example, the following command will search for all available updates:
wucltui /detectnow
To install all available updates, you can use the “wucltui /updatenow” command. You can also specify particular updates to install with the “/i” argument, followed by the update name or ID.
The Microsoft Update Catalog
The Microsoft Update Catalog is an online catalog of Microsoft and third-party updates, and it can be used to search for and download updates from the command line. The Microsoft Update Catalog is particularly useful for searching for and downloading specific updates, such as security patches, service packs, and feature packs.
The Microsoft Update Catalog can be accessed from the command line with the “msiexec.exe” command. For example, the following command will search for all available updates for the “Microsoft Windows 7 Service Pack 1” product:
msiexec /i “Microsoft Windows 7 Service Pack 1”
To download a specific update, you can use the “/d” argument, followed by the update name or ID. To install the downloaded updates, you can use the “msiexec /i” command, followed by the downloaded .msu file.
Conclusion
In this article, we have explored the different tools and commands available for searching and installing Windows updates from the command line. The Windows Update Agent (WUA) and the Windows Update Command-Line Tool (wucltui.exe) can be used to search for and install Windows and Microsoft product updates, while the Microsoft Update Catalog can be used to search for and download specific updates. With these tools, IT administrators can easily manage updates on multiple systems from the command line.