powershell as administrator Dism.exe /online /Cleanup-Image /StartComponentCleanup rem New cleanup of updates Stop-Service -Name wuauserv -Force Set-Service -Name wuauserv -StartupType Disabled md c:\wubwipe robocopy c:\wubwipe C:\Windows\SoftwareDistribution /MIR Set-Service -Name wuauserv -StartupType Automatic Start-Service -Name wuauserv rem net stop wuauserv rem takeown /f "C:\Windows\SoftwareDistribution" /R /A /D Y rem icacls "C:\Windows\SoftwareDistribution" /inheritance:r /grant:r Users:(OI)(CI)F /T /grant:r Everyone:(OI)(CI)F /T /grant:r SYSTEM:(OI)(CI)F /T /grant:r Administrators:(OI)(CI)F /T /grant Administrators:F /T /grant Users:F /T /grant SYSTEM:F /T /grant Everyone:F /T /C /grant *S-1-15-2-1:F rem icacls "C:\Windows\SoftwareDistribution" /grant Administrators,Users,SYSTEM,Everyone:F /T rem Rename-Item C:\Windows\SoftwareDistribution SoftwareDistribution.old rem net start wuauserv Rmdir C:\Windows\SoftwareDistribution.old -recurse rem net stop wuauserv rem takeown /f "C:\Windows\SoftwareDistribution" /R /A /D Y rem icacls "C:\Windows\SoftwareDistribution" /inheritance:r /grant:r Users:(OI)(CI)F /T rem icacls "C:\Windows\SoftwareDistribution" /inheritance:r /grant:r Everyone:(OI)(CI)F /T rem icacls "C:\Windows\SoftwareDistribution" /inheritance:r /grant:r SYSTEM:(OI)(CI)F /T rem icacls "C:\Windows\SoftwareDistribution" /inheritance:r /grant:r Administrators:(OI)(CI)F /T rem icacls "C:\Windows\SoftwareDistribution" /grant Administrators:F /T rem icacls "C:\Windows\SoftwareDistribution" /grant Users:F /T rem icacls "C:\Windows\SoftwareDistribution" /grant SYSTEM:F /T rem icacls "C:\Windows\SoftwareDistribution" /grant Everyone:F /T rem Rename-Item C:\Windows\SoftwareDistribution SoftwareDistribution.old rem net start wuauserv rem Rmdir C:\Windows\SoftwareDistribution.old -recurse rem If you need to repair windows deeper tun powershell as administrator and then do the following rem DISM /Online /Cleanup-Image /RestoreHealth Start-Process cleanmgr.exe -ArgumentList "/sagerun:65535" -Wait rem .