Skip to content
This repository was archived by the owner on May 28, 2021. It is now read-only.

Commit ed35417

Browse files
pablospizzamiglioDisassembler0
authored andcommitted
Add "Disable Windows Update automatic downloads" (#203)
1 parent 14f2f2c commit ed35417

2 files changed

Lines changed: 16 additions & 0 deletions

File tree

Default.preset

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ SetDEPOptOut # SetDEPOptIn
6161
### Service Tweaks ###
6262
# DisableUpdateMSRT # EnableUpdateMSRT
6363
# DisableUpdateDriver # EnableUpdateDriver
64+
# DisableUpdateAutoDownload # EnableUpdateAutoDownload
6465
DisableUpdateRestart # EnableUpdateRestart
6566
# DisableHomeGroups # EnableHomeGroups
6667
DisableSharedExperiences # EnableSharedExperiences

Win10.psm1

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -924,6 +924,21 @@ Function EnableUpdateDriver {
924924
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" -Name "ExcludeWUDriversInQualityUpdate" -ErrorAction SilentlyContinue
925925
}
926926

927+
# Disable Windows Update automatic downloads
928+
Function DisableUpdateAutoDownload {
929+
Write-Output "Disabling Windows Update automatic downloads..."
930+
If (!(Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU")) {
931+
New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Force | Out-Null
932+
}
933+
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Name "AUOptions" -Type DWord -Value 2
934+
}
935+
936+
# Enable Windows Update automatic downloads
937+
Function EnableUpdateAutoDownload {
938+
Write-Output "Enabling Windows Update automatic downloads..."
939+
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Name "AUOptions" -ErrorAction SilentlyContinue
940+
}
941+
927942
# Disable Windows Update automatic restart
928943
# Note: This doesn't disable the need for the restart but rather tries to ensure that the restart doesn't happen in the least expected moment. Allow the machine to restart as soon as possible anyway.
929944
Function DisableUpdateRestart {

0 commit comments

Comments
 (0)