Skip to content

Instantly share code, notes, and snippets.

@aplocher
Created June 13, 2015 03:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aplocher/81b947b4c42165d6faf3 to your computer and use it in GitHub Desktop.
Save aplocher/81b947b4c42165d6faf3 to your computer and use it in GitHub Desktop.
Fix Windows Update issues with Windows 10 (could likely fix issues experienced in Win 8.1 and earlier, too)
@echo off
:: Windows 10 Update issues
:: Stop / Disable Windows Update
sc config wuauserv start=disabled
taskkill /f /fi "SERVICES eq wuauserv"
net stop wuauserv
:: Clean temp files [where modified date not within the last 24 hours]
powershell.exe -ExecutionPolicy Bypass -Command "Get-ChildItem $env:temp | Where-Object {$_.LastWriteTime -lt (Get-Date).AddDays(-1)} | Remove-Item -Force -Recurse"
:: Re-enable / Start Windows Update Service
sc config wuauserv start=demand
net start wuauserv
echo.
echo Done
echo.
pause
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment