According to an emailed statement from Microsoft, Windows updates ensure that your computer is continuously kept up to date with new innovations and security updates – this is, they say, the optimum way to ensure users are running the best version of Windows possible. Doing this, says the company, will also protect against loss of data and information theft, among countless other potential problems.

Windows Updates can be run from PowerShell and Command Prompt in Windows 11/10.

Run Windows Updates from Command Line

The following methods will be carried out to run Windows Update from Command Line on Windows 11/10-

  1. Using Windows Powershell.
  2. Using Command Prompt.

1] Run Windows Update using Windows Powershell

Running Windows Updates on Windows Powershell will require you to manually Install the Windows Update module, Get Windows Updates downloaded and Install Windows Updates. And for this, open Windows Powershell and run it with Administrator level privileges.

  • Install the PSWindowsUpdate Module
Install-Module PSWindowsUpdate
  • Check for Updates
Get-WindowsUpdate 
//connect to the Windows Update servers and download the updates if found.

PS: Wenn Sie eine Fehlermeldung erhalten:

PS C: WINDOWS system32> Get-WindowsUpdateGet-WindowsUpdate: Der Befehl ‘Get-WindowsUpdate’ wurde im Modul ‘PSWindowsUpdate’ gefunden, das Modul konnte jedoch nicht geladen werden. Weitere Informationen erhalten Sie, wenn Sie das PSWindowsUpdate-Modul importieren. Zeile: 1 Zeichen: 2+ Get-WindowsUpdate + ~~~~~~~~~~~~~~~~~ + + Informationskategorie: ObjectNotFound: (Get-WindowsUpdate: String) (), CommandNotFoundException + FullyQualifiedErrorId: CouldNotAutoloadMatchingModule

To overcome this, let´s type “script” (or skript if you windows is translated in german) in the Windows 10 search bar and an option “Allow local PowerShell scripts to run without logging in” will appears. Just click on “Open” button.

then click on the “apply” button:

Now close PowerShell and run it again as administrator and try to use the command: Get-Windowsupdate

  • Install Updates
Install-WindowsUpdate
//Install the Windows Updates downloaded on your computer.
  • Check for Microsoft Updates
Add-WUServiceManager -MicrosoftUpdate
  • Install specific updates only
Get-WindowsUpdate -KBArticleID "KB1234567" -Install
  • Skip Updates belonging to specific categories
Install-WindowsUpdate -NotCategory "Drivers","FeaturePacks" -AcceptAll

2] Run Windows Update using Command Prompt

Command Prompt on Windows Operating Systems exists since a very long time whereas Windows Powershell is comparatively new. Hence, it has similar capabilities to run Windows Updates, but the highlighting point here is that you do not need to download any module for Windows Updates.

First, open Command Prompt and run it with Administrator level privileges.

  • Start checking for updates
UsoClient StartScan
  • Start downloading Updates:
UsoClient StartDownload
  • Start installing the downloaded updates:
UsoClient StartInstall
  • Restart your device after installing the updates:
UsoClient RestartDevice
  • Check, Download and Install Updates:
UsoClient ScanInstallWait

PS: It is worth noting that, the Command Prompt commands mentioned above are just meant for Windows 11/10 only.

Reference:

https://www.thewindowsclub.com/

By Shabazz

Software Engineer, MCSD, Web developer & Angular specialist

Leave a Reply

Your email address will not be published. Required fields are marked *