Do you know we can also install updates using commands on Command Prompt on Windows? Yes, you can check for updates, download them, and install them using PowerShell or Command Prompt. In this guide, we show you various command-line switches to deploy update packages on Windows 11/10.
Command-line switches to deploy Microsoft software Update packages
The following are the various command-line tools that you can use to do various functions with Microsoft software update packages.
- /help; /h; /?
- /warnrestart[:x ]
Let’s get into the details of each command-line tool.
1] /help; /h; /?
This command-line tool helps you get help in the form of a dialog box with information showing the correct usage of the Setup command, a list of command-line switches, and their behaviors. This switch is invoked when you use a command-line switch wrongly and guides you on using it correctly. Also, you can display it on the Command-line Interface (CLI) or the graphical user interface (GUI).
This makes the installation or uninstallation programs run in the background quietly without even showing you warnings, info, or restart prompts. All the prompts or messages are saved in a log file.
This command-line switch runs the installation or uninstallation program in the passive mode. In this mode, you don’t get any prompts or messages while in the process. You can see the progress of the process, but cannot cancel the process. A /warnrestart switch is invoked by default in this mode, just to warn you about restart in the process.
Read: How to run Windows Updates from Command Line
If you don’t want your computer to restart after the installation or uninstallation process is complete, this command-line switch can help you avoid it. It stops the restart process, even if the program requires it.
This command-line switch forces the restart of your computer even if the program doesn’t require it after the installation of uninstallation to make changes. When you use this command all the running programs and processes are closed for restart.
6] /warnrestart[:x ]
This command-line switch invokes a dialog box that warns you of restarting in x seconds. x in the command indicates the number of seconds in which the restart occurs. If no value is specified, it will restart in 30 seconds, by default. The dialog box also contains a Cancel and a Restart Now button. You can click on any button to proceed with the restart or cancel it.
It prompts the user to restart the computer for the changes to take effect. It is up to the user to restart or cancel it.
It uninstalls the package from your completely when you run this command-line switch.
This command-line switch enables the user to show the path for the local log file. It also invokes the default logging behavior.
Using this command-line switch, you can extract the installation files to a specified folder on your computer.
These are the different command-line switches that can help you deploy Microsoft software update packages.
Read: How to update Drivers using Command Prompt
How do I install updates from the command line?
You can install updates from the command line easily using the specified commands like UsoClient StartScan for checking the updates, UsoClient StartDownload for downloading updates, UsoClient StartInstall for installing updates, etc.
What is the command to update policies in cmd?
To update policies in Command Prompt, type gpupdate /target: computer, to update the policies that have been changed, press Enter. To update all the previous policies whether changed or unchanged, type gpupdate /target: computer /force and press Enter.
Related Read: How to check Windows Update History using PowerShell or CMD.