It’s always recommended to regularly update Windows as the updates solve any existing bugs and bring about new features.

Usually, users utilize the graphical interface on the OS to search for and install updates. However, there are some cases where you may want to run this process from the Command-line (CLI) tools such asCommand Prompt and Windows PowerShell.

For instance, you may need to manage updates, especially for other users on a Windows server. Or, you may be creating a script where you need such commands.

cmd-run

How to Run Windows Update from Command Line?

There are a few ways to run Windows Update from the command line on a Windows system, which are as follows:

On Windows 10 and 11, Microsoft uses the Update Session Orchestrator ClientUsoClient.exetool for updating your system components.

Previously, it was possible for users to use this program from the Command Prompt to check and install updates. However, in the latest versions, you may only check for updates. Regardless, you can try using the steps below and verify if they work out for you:

usoclient

you may also check which UsoClient commands you can use on your system by using the following command on the Elevated Windows PowerShell:

Onolder Windows versions, you could utilize the Windows Update AgentWUAUCLT.exeto update Windows.

First, you need to enable Automatic Updates with scheduled installation through the Group Policy. Otherwise using the Windows Update Agent from Command Prompt won’t work. To do so,

check-usoclient

Then, you may utilize the following commands on Prompt to update Windows using the Update Agent:

Microsoft didn’t exactly create theWUAUCLT.exeandUsoClient.exetools for end users. So you won’t get any additional information for whether the commands are actually running when you use them on the Command Prompt. The Prompt will show that these commands have finished running even when they are still operating in the background.

You have to estimate the time it may take and wait until then. So, instead of this method, we recommendusing Windows PowerShellas you may get more detailed information during the process.

windows-update-manage-end-user-experience

Windows PowerShell is a very powerful Windows CLI with which you may do everything that Command Prompt allows and many more. Naturally, you can use it to run windows updates. Here’s what you need to do:

Using Visual Basic Script

windows-update-manage-end-user-experience-1

auto-download-schedule

wuauclt

install-module-windows-update