Disable Windows Update

Modified on Fri, 22 Aug at 10:25 AM

Run in admin PowerShell:

# Run as Administrator

# Set NoAutoUpdate policy
Write-Host "Setting NoAutoUpdate policy..."
New-Item -Path "HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate\AU" -Force | Out-Null
Set-ItemProperty -Path "HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate\AU" -Name "NoAutoUpdate" -Value 1
Write-Host "...done"

# Stop and disable Windows Update service
Write-Host "Stopping and disabling Windows Update service..."
Set-Service -Name wuauserv -StartupType Disabled
Stop-Service -Name wuauserv -Force
Write-Host "...done"

# Disable Windows Update scheduled tasks
Write-Host "Disabling Windows Update scheduled tasks..."
$tasks = @(
    "\Microsoft\Windows\WindowsUpdate\Scheduled Start",
    "\Microsoft\Windows\WindowsUpdate\Automatic App Update",
    "\Microsoft\Windows\WindowsUpdate\sih",
    "\Microsoft\Windows\WindowsUpdate\sihboot"
)

foreach ($task in $tasks) {
        Write-Host "Disabling task: $task ..."
        Disable-ScheduledTask -TaskPath $task.Substring(0, $task.LastIndexOf("\") + 1) -TaskName $task.Substring($task.LastIndexOf("\") + 1)
        Write-Host "... done"
}
Write-Host "...done"

Write-Host "Windows Update has been disabled."

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article