Windows Update Powershell Commands

From DFWLPiki
Revision as of 14:56, 23 February 2020 by Jhorne (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

The PSWindowsUpdate set of commands is required.

Apply all available updates:

Set-ExecutionPolicy -ExecutionPolicy Bypass -Force
Import-Module PSWindowsUpdate
Get-WUInstall -AcceptAll

List all available updates

Set-ExecutionPolicy -ExecutionPolicy Bypass -Force
Import-Module PSWindowsUpdate
Get-WUList

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