Skip to content

Commit 16f6815

Browse files
[windows] disable WindowsUpdate service (#8605)
1 parent 8c66e96 commit 16f6815

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

images/win/scripts/Installers/Finalize-VM.ps1

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,9 @@ $regUserServicesToDisables | ForEach-Object {
8989
} | Out-Null
9090

9191

92+
Write-Host 'Disable Windows Update Service'
93+
Set-ItemProperty -Path HKLM:\System\CurrentControlSet\Services\wuauserv -Name Start -Value 4 -Force
94+
9295
# Disabled services
9396
$servicesToDisable = @(
9497
'wuauserv'
@@ -102,6 +105,7 @@ $servicesToDisable = @(
102105
)
103106

104107
$servicesToDisable | ForEach-Object {
108+
Stop-Service -Name $_
105109
Set-Service -Name $_ -StartupType Disabled -ErrorAction Ignore
106110
} | Out-Null
107111

0 commit comments

Comments
 (0)