How to install Windows 10 update using PowerShell

You can install the latest updates on Windows 10 using PowerShell, and in this guide, you'll learn the steps to complete this process.

Windows 10 update with PowerShell
Windows 10 update with PowerShell
  • To install updates on Windows 10 from PowerShell, open “PowerShell (admin),” run the “Install-Module PSWindowsUpdate” command to install the module, “Get-WindowsUpdate” to view available updates, and “Install-WindowsUpdate” to install all the cumulative updates.
  • To download, install, and reboot Windows 10, open “PowerShell (admin)” and run the “Get-WindowsUpdate -AcceptAll -Install -AutoReboot” command.
  • The “Get-WindowsUpdate -Install -KBArticleID ‘KB5031445′” command allows you to install a specific Windows 10 update.

UPDATED 11/8/2023: Windows 10 updates happen automatically or manually through the Windows Update settings. However, if you try to patch a new installation or create a custom script to automate the process, you can use commands to download and install missing patches with the “PSWindowsUpdate” module on PowerShell.

Michal Gajda has created the PSWindowsUpdate module, and it’s available through the PowerShell Gallery. It includes the components to make it easy to check, download, and install updates on Windows 10.

In this guide, I will teach you the steps to check and install updates for Windows 10 using PowerShell.

Update Windows 10 from PowerShell

To check and install updates with PowerShell, use these steps:

  1. Open Start on Windows 10.

  2. Search for PowerShell, right-click the top result, and select the Run as administrator option.

  3. Type the following command to install the module to run Windows Update and press Enter:

    Install-Module PSWindowsUpdate

    Install PSWindowsUpdate

    Quick note: After installing the module, you no longer need to repeat step No. 3 to use the module and manage updates.
  4. Type A and press Enter to confirm.

  5. Type the following command to check for updates with PowerShell and press Enter:

    Get-WindowsUpdate
  6. Type the following command to install the available Windows 10 updates and press Enter:

    Install-WindowsUpdate

    PowerShell install Windows 10 updates

  7. Type A and press Enter to confirm.

Once you complete the steps, the latest cumulative updates will be downloaded and installed on your computer.

Manage updates with PowerShell

The PSWindowsUpdate module includes many options to manage updates. You can always use the Get-Command –Module PSWindowsUpdate command to query a list of the available commands.

1. Auto reboot system after update command

To download, install, and then reboot the computer to complete the update process, use these steps:

  1. Open Start.

  2. Search for PowerShell, right-click the top result, and select the Run as administrator option.

  3. Type the following command to download and install all the available updates, reboot the system, and press Enter:

    Get-WindowsUpdate -AcceptAll -Install -AutoReboot

After completing the steps, Windows 10 will download and install all the available updates, rebooting the computer to apply the changes automatically.

2. Download a specific update command

To download and install a specific update on Windows 10 from PowerShell, use these steps:

  1. Open Start.

  2. Search for PowerShell, right-click the top result, and select the Run as administrator option.

  3. Type the following command to list the available updates along with their KB numbers with PowerShell and press Enter:

    Get-WindowsUpdate
    
  4. Type the following command to download, install a specific update, reboot the system, and press Enter:

    Get-WindowsUpdate -Install -KBArticleID 'KB5031445'

    In the command, replace “KB5031445” with the KB name of the update you want to install.

Once you complete the steps, in this case, Windows 10 will download and install update KB5031445 on your device.

Windows 10 comes with the Windows Update Provider but has limited options compared to the PSWindowsUpdate module and is more complicated to use.

Update November 8, 2023: This guide has been updated to ensure accuracy and reflect changes.

About the author

Mauro Huculak is a Windows expert and the Editor-in-Chief who started Pureinfotech in 2010 as an independent online publication. He is also been a Windows Central contributor for nearly a decade. Mauro has over 12 years of experience writing comprehensive guides and creating professional videos about Windows, software, and related technologies, including Android and Linux. Before becoming a technology writer, he was an IT administrator for seven years. In total, Mauro has over 20 years of combined experience in technology. Throughout his career, he achieved different professional certifications from Microsoft (MSCA), Cisco (CCNP), VMware (VCP), and CompTIA (A+ and Network+), and he has been recognized as a Microsoft MVP for many years. You can follow him on X (Twitter), YouTube, LinkedIn and About.me.