A set of PowerShell commands for configuring Windows Update settings on Windows 10
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.vscode
assets
docs
en-us
README.md
WindowsUpdateSetting.psd1
WindowsUpdateSetting.psm1
changelog.md
license.txt

README.md

WindowsUpdateSetting

The PowerShell commands in this module are intended to make it easier to automate the process of pausing and resuming Windows Updates on a Windows 10 desktop as well as a few other update related settings. This module will not work on Windows 10 Home. If you are running Windows 10 Enterprise, your settings may be managed via Group Policy.

You can install the latest version of this module from the PowerShell Gallery.

Install-Module WindowsUpdateSetting

The module should work on PowerShell Core running on a Windows platform.

Command Overview

Get-WindowsActiveHours

Get-WindowsUpdateDeferral

Get-WindowsUpdateSetting

Resume-WindowsUpdate

Set-WindowsActiveHours

Set-WindowsUpdateDeferral

Suspend-WindowsUpdate

Test-IsWindowsUpdatePaused

Suspend and Resume Windows Updates

Normally, you would use Settings to pause Windows Update for 35 days.

settings

You can use this module to toggle that setting from a PowerShell prompt.

PS C:\> Suspend-WindowsUpdate -passthru

Computername  : BOVINE320
UpdatesPaused : True
PauseStartUTC : 9/20/2018 2:06:28 PM
PauseEndUTC   : 10/25/2018 2:06:28 PM
Remaining     : 35.03:59:59.1529862

Or you can specify a date, as long as it is less than 35 days. Use Get-WindowsUpdateSetting to view the current values or Test-IsWindowsUpdatePaused to test.

Configure Active Hours

This module also contains commands to set your active hours.

activehours

PS C:\> Get-WindowsActiveHours

Computername ActiveHoursStart ActiveHoursEnd
------------ ---------------- --------------
BOVINE320                   6             21


PS C:\> Set-WindowsActiveHours -StartTime 6:00 -EndTime 20:00 -Passthru

Computername ActiveHoursStart ActiveHoursEnd
------------ ---------------- --------------
BOVINE320                   6             20

Configure Update Deferral

The module also contains commands to manage deferrals of certain updates.

deferrals

You can view and modify these settings.

PS C:\> Get-WindowsUpdateDeferral

Computername FeatureUpdateDeferral QualityUpdateDeferral
------------ --------------------- ---------------------
BOVINE320                       30                     7


PS C:\> set-WindowsUpdateDeferral -Feature 0 -Quality 0 -Passthru

Computername FeatureUpdateDeferral QualityUpdateDeferral
------------ --------------------- ---------------------
BOVINE320                       30                     7

You should test all of these commands on a non-production system.

last updated 23 October 2018