[windows] disable WindowsUpdate service (#8605)

This commit is contained in:
ilia-shipitsin
2023-10-20 09:36:17 +02:00
committed by GitHub
parent 8c66e96bea
commit 16f681595d

View File

@@ -89,6 +89,9 @@ $regUserServicesToDisables | ForEach-Object {
} | Out-Null
Write-Host 'Disable Windows Update Service'
Set-ItemProperty -Path HKLM:\System\CurrentControlSet\Services\wuauserv -Name Start -Value 4 -Force
# Disabled services
$servicesToDisable = @(
'wuauserv'
@@ -102,6 +105,7 @@ $servicesToDisable = @(
)
$servicesToDisable | ForEach-Object {
Stop-Service -Name $_
Set-Service -Name $_ -StartupType Disabled -ErrorAction Ignore
} | Out-Null