Created
June 13, 2015 03:56
-
-
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)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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