#RequireAdmin
Stop-Service @("wuauserv","cryptSvc","bits")
if(Test-Path "$($env:SystemRoot)\System32\SoftwareDistribution.bak")
{
Remove-Item -Path "$($env:SystemRoot)\System32\SoftwareDistribution.bak" -Force
}
if(Test-Path "$($env:SystemRoot)\System32\catroot2.bak")
{
Remove-Item -Path "$($env:SystemRoot)\System32\catroot2.bak" -Force
}
Rename-Item -Path "$($env:SystemRoot)\System32\SoftwareDistribution" SoftwareDistribution.bak
Rename-Item -Path "$($env:SystemRoot)\System32\catroot2" catroot2.bak
Start-Sleep -Seconds 1
Start-Service @("wuauserv","cryptSvc","bits")