In Windows, updates are essential to maintain the stability, security, and performance of your system. In this article, we’ll show you how to install and remove updates using both Command Prompt and PowerShell.
Installing Updates via Command Prompt:
To install updates in Windows, you need to download the updates from the Microsoft Update Catalog or Windows Update and then install them on your system. You can use the Windows Update Standalone Installer (wusa.exe) to install updates from the command line. The syntax for the wusa.exe command is as follows:
wusa <Update_Package>.msu /quiet /norestart
Replace “<Update_Package>.msu” with the name of the update package you want to install. The /quiet switch is used to install the update without displaying any prompts or notifications, and the /norestart switch is used to prevent the system from automatically restarting after the update is installed.
Removing Updates via Command Prompt:
To remove an installed update using Command Prompt, you can use the same wusa.exe command with the /uninstall switch. The syntax for removing an update is as follows:
wusa /uninstall <Update_Package>.msu /quiet /norestart
Replace “<Update_Package>.msu” with the name of the update package you want to remove.
Listing Installed Updates via Command Prompt:
To see a list of installed updates in Windows, you can use the following command in Command Prompt:
wmic qfe list
This command will show a list of all updates that are installed on your system, including the update name, hotfix ID, installed on date, and more.
Installing and Removing Updates via PowerShell:
In addition to using Command Prompt, you can also use PowerShell to install and remove updates in Windows. Here’s how you can do it:
Installing Updates via PowerShell:
To install updates in Windows using PowerShell, you can use the following command:
Start-Process -FilePath "wusa.exe" -ArgumentList "<Update_Package>.msu /quiet /norestart" -Wait
Replace “<Update_Package>.msu” with the name of the update package you want to install.
Removing Updates via PowerShell:
To remove an installed update using PowerShell, you can use the following command:
Start-Process -FilePath "wusa.exe" -ArgumentList "/uninstall <Update_Package>.msu /quiet /norestart" -Wait
Replace “<Update_Package>.msu” with the name of the update package you want to remove.
Listing Installed Updates via PowerShell:
To see a list of installed updates in Windows using PowerShell, you can use the following command:
wmic qfe list brief /format:table | sort InstalledOn
This command will show a table of all installed updates sorted by the date they were installed.
Whether you use Command Prompt or PowerShell, updating your system is an important part of maintaining the stability, security, and performance of your Windows computer. By using the commands described in this article, you can easily install and remove updates, as well as list the updates that are installed on your system.