Powershell

How to Trigger Windows Update using CMD

With the aid of the Windows Update tool, you can keep your Windows operating system updated with the newest security updates, bug fixes, and feature additions. When new updates are available, Windows Update typically runs automatically in the background and installs them. However, sometimes you may want to manually check for and install updates, especially if you are facing some issues with your system or want to get the latest features faster.

How to Trigger Windows Update using CMD

One way is by using the command-line interface (CLI) tools such as Command Prompt (CMD) and Windows PowerShell. This can be useful if you want to manage updates on multiple computers, create scripts, or troubleshoot problems. To trigger Windows Update using CMD there are two utilities:

Method 1: Using Windows Update Agent (WUA)

Using the command line, you may search for, download, and install updates using the Windows Update Agent (WUA) tool. Older Windows versions including Windows 7, 8, and 8.1 are compatible with WUA. However, it might not function on more recent versions, such Windows 10 and 11.

Run CMD with administrative privileges and execute the below given command to check for the updates:

wuauclt /detectnow

 

Since my system has no pending updates so the command does display any so if you have any updates then execute:

wuauclt /updatenow

 

Further you can combine both the process of scanning for updates and installing them by executing:

wuauclt /detectnow /updatenow

 

Method 2: Using Update Session Orchestrator Client (USO)

With the help of the program Update Session Orchestrator Client (USO), you can use the command line to search for, download, and install updates. Windows 10 and 11 are newer Windows versions that USO supports but on previous versions, it might not function, though. To use USO, you do not need to enable any settings or policies. You can use USO from CMD by following these steps:

Run the CMD with administrative privileges and execute the below given command to check for the updates:

UsoClient StartScan

 

Since my system has no pending updates so the command does display any so if you have any updates then execute the below command to just download the updates:

UsoClient StartDownload

 

Now to install all the downloaded updates just run the StartInstall command:

UsoClient StartInstall

 

You can also scan, download and install the updates on the system using CMD by executing:

UsoClient ScanInstallWait

 

Conclusion

To trigger Windows Update using CMD in there are two different ways one is Windows Update Agent (WUA) and Update Session Orchestrator Client (USO). WUA works on older versions of Windows, while USO works on newer versions.

About the author

Aaliyan Javaid

I am an electrical engineer and a technical blogger. My keen interest in embedded systems has led me to write and share my knowledge about them.