How to Install Windows 11 Updates via PowerShell

Xploit Machine

Well-known member
Joined
Nov 29, 2022
Messages
903
Reaction score
83
Keeping Windows 11 updated is essential for its security and for new features, but how do you do it? Windows 11 system updates typically include security patches, new features, bug fixes, and overall performance improvements. These updates ensure that your PC runs smoothly and securely all the time. Hence, it's always a good idea to keep your Windows 11 PC up to date with the latest version. PowerShell is another option for installing Windows 11 updates. Unlike Command Prompt, Windows PowerShell does not require you to download the MSU file first. This method can come in handy if your PC fails to boot, and you want to install updates through the Windows recovery environment.

To install Windows 11 updates using PowerShell:
  1. Press Win + S to open the search menu.​
  2. Type Windows PowerShell in the search box and select Run as administrator from the right pane.​
  3. Select Yes when the User Account Control (UAC) prompt appears.​
  4. Run the following command to install the required PowerShell module to update Windows 11: Install-Module PSWindowsUpdate
  5. Type the following command and press Enter to allow scripts to run on PowerShell: Set-ExecutionPolicy RemoteSigned
  6. Paste the following command and press Enter to import the installed module:Import-Module PSWindowsUpdate​
  7. Run this command to check for pending Windows updates:Get-WindowsUpdate​
  8. PowerShell will display a list of available Windows updates. Note down the KB numberof the update you want to install.
  9. Run this command to download and install the update. Install-WindowsUpdate -KBArticleID KBNumber
    Replace KBNumber in the above command with the KB number associated with the update you want to get. For instance, if you’re looking to install a Windows update with the KB2267602 number, here’s what your command should look like:Install-WindowsUpdate -KBArticleID KB2267602​
  10. Type A to confirm your choice and press Enter.
  11. Allow PowerShell to complete the update installation. Then, run the following command to verify that the update was successfully installed. Get-WUHistory.
1696132895173.png

1696132876154.png

Source MakeUseOf
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top