We already covered about windows Update, how to start and stop windows update in a normal way. In this post we will cover about installing Windows Update using PowerShell. PowerShell is powerful command line scripting language integrated into the .NET framework, which can be embedded within other applications. It automates batch processing and creates system management tools. It includes more than 130 standard command line tools for functions and enables administrators to perform tasks on local and remote Windows systems through access to Component Object Model (COM) and Windows Management Instrumentation (WMI).

To install a windows update we have to install the module first, Module is a package of commands such as cmdlets, providers, functions, workflows, variables, and aliases. To run a windows update, install windows update module first.

Step 1: Install Windows Module.

  • Open PowerShell in admin mode, Run below mentioned command.

Install-Module PSWindowsUpdate

Installing PS Module in Powershell-Windows Update using PowerShell

Step 2: Download Windows Update

Run below mentioned command, this command will check for recent updates. Before running the command, you have to check the Execution policy. Check here how to enable the execution policy?


Downloading windows Update using powershell-Windows Update using PowerShell

Step 3: Install Windows Update.

Before installing windows Update check for windows installer service is enabled or not. We can enable the installer service in GUI method, but this post is about PowerShell and installing Windows Update using PowerShell so we enable the windows installer service using PowerShell itself.

  • Open PowerShell and type below mentioned command to start windows installer service.

Start-Service msiserver

  • Next run the below mentioned command to install the windows update.


installing windows update using powershell-Windows Update using PowerShell

This command will install recent windows update which is shown by step 2 command.