Monthly Archives: November 2020

Manage Windows Update with PowerShell

When you like dealing with servers or workstations remotely, using PSSession for instance, or when you are just a terminal nerd, it’s really nice to be able to run Windows Update this way.

This post will list what you have to to do in order to enable this feature on a Windows 10 workstation.

Trust the gallery

In order to install the Windows Update PowerShell module, we have to trust the Microsoft repository where it comes from. To do so, use this command:

Set-PSRepository -Name 'PSGallery' -InstallationPolicy Trusted

Install the module

Install-Module PSWindowsUpdate

Use PowerShell to update the device

Now the module is installed, you can use the following command to check and install updates from the command line:

Get-WindowsUpdate
Install-WindowsUpdate