Windows Updates often include feature enhancements and security updates to protect Windows from malware and malicious attacks. Windows Update can also be used to update drivers for popular hardware devices. Patches and other security updates are routinely released through Windows Update on the second Tuesday of every month – it’s called Patch Tuesday.

Use Batch file to download & install Windows Updates

To use a batch file to download and install Windows updates, follow the instructions outlined below. To begin, you’ll need to make a note of the KB number which you want to install, then you have to create a batch file to download the Windows updates from the Microsoft Update Catalog.

Head over to the Microsoft Update Catalog and search for the KB number which you want to download.Choose the correct patches/updates which is appropriate for your system architecture and operating system.Click on the Download button, then you will get a popup to download the package.Right-click on the msu link and copy the link.  You’ll have to paste it accordingly in the script below.Open Notepad and copy-paste the script below. Make sure the KB numbers and the MSU link are replaced correctly as per your requirement.

Read next: What is Windows Update Servicing Cadence? The first part of the script downloads the updates from the link which you have specified and the second part of the script installs the Windows updates. IT administrators will find this script most helpful to install updates on multiple systems.