Windows Update Powershell Commands: Difference between revisions

From DFWLPiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 6: Line 6:


Apply all available updates:
Apply all available updates:
  Set-ExecutionPolicy -ExecutionPolicy Bypass -Force
  Install-WindowsUpdate -AcceptAll
Import-Module PSWindowsUpdate
Get-WUInstall -AcceptAll


List all available updates
List all available updates
Set-ExecutionPolicy -ExecutionPolicy Bypass -Force
Import-Module PSWindowsUpdate
  Get-WUList
  Get-WUList


Show Updates sources and which is default (Desired state is usually "true" for Windows Server Update Service)
Show Updates sources and which is default (Desired state is usually "true" for Windows Server Update Service)
Set-ExecutionPolicy -ExecutionPolicy Bypass -Force
Import-Module PSWindowsUpdate
  Get-WUServiceManager
  Get-WUServiceManager

Revision as of 20:15, 10 April 2020

The PSWindowsUpdate set of commands is required.

Install the PSWindowsUpdate module:

Install-Module -Name PSWindowsUpdate –Force

Apply all available updates:

Install-WindowsUpdate -AcceptAll

List all available updates

Get-WUList

Show Updates sources and which is default (Desired state is usually "true" for Windows Server Update Service)

Get-WUServiceManager