Run Windows Update From Command Line (Windows 10/11)

Run Windows Update From Command Line (Windows 10/11). In this guide, we will introduce Windows update, its type then show you different method to run Windows update via command line.

What is Windows Update?

Image Source: Howtogeek

Windows Update is a free service from Microsoft that helps keep your computer up to date with the latest security and software updates. When you install new software, Windows Update automatically checks for and downloads any available updates. Also check manually for updates from the Windows Update Control Panel.

Here with Windows Update is a service that was first introduced with Windows Vista, and it has been included in every version of Windows since then. It provides users with the option to install various updates and new features on their systems.

The concept behind this service is simple: when you want an update, instead of searching online for files or downloading them yourself, you can simply click on the “Check for Updates” button on your system.

Types of Windows Updates

Well, with Windows updates are used to update drivers for hardware devices as well as patches and other security areas to prevent malware and malicious attacks. There are various types of Windows Updates:

Defender Based Updates

Windows Defender is an integrated security solution that protects you from known and unknown threats. Primarily designed to provide real time protection against viruses, spyware, and other potentially unwanted software, as well as to identify and block attempts at unauthorized access.

Rollup Updates

Rollups include all the security fixes Microsoft releases in one group of updates. This means that you won’t have to install multiple updates if one fails or doesn’t solve your issue. Rollup updates also include non security improvements like reliability improvements, minor feature enhancements, and other fixes that improve the overall performance of Windows 10 on your device.

Service Packs

Service Packs are cumulative updates that include all the latest fixes for a particular Windows release. These updates are released once or twice a year and are installed on any computer running the same Windows release.

The Service Pack is designed to address any security vulnerabilities and bugs that were found in the previous versions of Windows. In addition, it also includes any new features that Microsoft has added to the operating system since the last Service Pack release.

Critical Updates

Critical updates are important for software and hardware compatibility, security, and stability of the computer. These are mostly released to fix problems addressing some of the critical non security related bugs.

Why it is important to install Windows Update?

Simple, the Windows Update is important because it comes with security updates, which means that Microsoft can fix any problems with its software. This makes Windows more secure and keeps you safe from viruses, malware, and other threats.

If you have a virus on your computer and you don’t have the latest version of Windows Update installed then the virus will still be there after the update has been installed. Therefore, if you get a new version of Windows Update then all of your old viruses will be removed automatically.

In short, Windows Update helps protect your computer from specific types of malware by downloading definitions for known viruses, spyware, and other types of malicious software. Without Windows Update enabled, you won’t be able to install updates that contain these files.

Use the Update service to check for newly released patches, but also use it to install new patches and security updates.

What is more, with Windows Update is also useful if you want to install some features built into Windows 7 or 8 (such as BitLocker encryption or virtualization). These features are often installed through other methods (like entering an administrator password), so they won’t show up in the normal list of installed updates if you haven’t used them recently enough.

Overall, these updates are essential to keep Windows up to date with the latest security updates.

We shall do the main part of this article How To Run Windows Update From Command Line (Windows 10/11).

How To Run Windows Update From Command Line (Windows 10/11)

Image Source: Youtube

Firstly, install the WuInstall tool to run Windows update via command prompt. WuInstall is a powerful tool that allows you to download and install Windows updates via command prompt.

Download and install WuInstall tool from its official download page. After the installation, open the Windows command prompt in administrative mode.

First, search for the latest updates using the following command:

				
					wuinstall /search
				
			

This command will prints a list of all updates.

To download all available updates to your system, run the following command:

				
					wuinstall /download
				
			

To install all downloaded updates, run the following command:

				
					wuinstall /install
				
			

If you want to install updates without showing anything on the screen, run the following command:

				
					wuinstall /quiet
				
			

To accept any agreement during update installation, run the following command:

				
					wuinstall /autoaccepteula
				
			

If you want to install all updates after the system restart, run the following command:

				
					wuinstall /rebootcycle
				
			

In some cases, Windows update files get corrupted and you can not download and install the corrupted update files. In this case, you can fix corrupted Windows update using the following command:

				
					dism.exe /Online /Cleanup-image /Restorehealth
				
			

After running the above command, you will need to try downloading and installing the updates again.

How to Run Windows Update Via PowerShell (Windows 10/11)

PowerShell provides a simple and easiest way to run update via command line. First, you will need to install the “PowerShell Windows Update module” to run the update.

First, open your PowerShell and run the following command to install the “PowerShell update module”:

				
					Install-Module PSWindowsUpdate
				
			

After installing the above module, you see the list of all commands available in the module using the following command:

				
					Get-Command -module PSWindowsUpdate
				
			

You should see the following screen:

By default, the above module only install the Windows and driver updates. If want to install updates of other Microsoft product, run the following command:

				
					Add-WUServiceManager -MicrosoftUpdate
				
			

Next, allow the execution of scripts on your machine by running the following command:

				
					Set-ExecutionPolicy -ExecutionPolicy RemoteSigned
				
			

In this step, download and list all available updates using the following command:

				
					Get-WindowsUpdate
				
			

You should see the list of all available updates in the following screen:

To install all Windows update, run the following command:

				
					Install-WindowsUpdate
				
			

You should see the following screen:

To install all Windows and other product updates, run the following command:

				
					Install-WindowsUpdate -MicrosoftUpdate
				
			

If you want to install a specific Windows Update from the available updates list, use the following command:

				
					Get-WindowsUpdate -KBArticleID "KB-Number" -Install
				
			

If you want to install only Driver updates, run the following command:

				
					Install-WindowsUpdate -NotCategory "Drivers","FeaturePacks" -AcceptAll
				
			

How to Uninstall Windows Updates via Command Line

First, get a list of all installed updates with the following command:

				
					wmic qfe list brief /format:table
				
			

You should see the following screen:

Next, pick any KB number from the above list and run the following command to uninstall it:

				
					wusa /uninstall /kb:Number
				
			

Thank you for reading How To Run Windows Update From Command Line (Windows 10/11). We will now conclude.

Run Windows Update From Command Line (Windows 10/11) Conclusion

Summing up, Windows Update has been a part of Windows since its release in 1985 as a way for Microsoft to update its operating system. The idea behind this service was that it would be easier for users to install updates from Microsoft or other vendors, as opposed to having to manually download them from their local computer or placing an order at a retail store.

While the original version of Windows Update was fairly simple, it has evolved over the years into a robust service that allows users to download any available update package directly from Microsoft’s website without having to manually search for it online or install it manually using software like Program Compatibility Wizard.

Lastly, Windows Update is a service that helps keep Windows, apps, and devices up to date with the latest security updates, stability improvements, and feature updates. You can use Windows Update to automatically download updates from Microsoft.

To check out more about Windows content, please navigate to our blog here

Avatar for Hitesh Jethva
Hitesh Jethva

I am a fan of open source technology and have more than 10 years of experience working with Linux and Open Source technologies. I am one of the Linux technical writers for Cloud Infrastructure Services.

0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x