✅ How to use
- Open PowerShell as Administrator.
- Copy-paste the script and press Enter.
- After it finishes, open Settings → Windows Update and check for updates again.
##########################################################################
# Run as Administrator PowerShell / PowerShell IE
Write-Host "Allowing PowerShell script execution..." -ForegroundColor Yellow
Set-ExecutionPolicy -ExecutionPolicy Undefined -Scope LocalMachine -Force
Start-Sleep -Seconds 5
# Reset Windows Update components script
# Run this in an elevated PowerShell (Run as Administrator)
Write-Output "Stopping services..."
Stop-Service -Name bits, wuauserv, cryptsvc -ErrorAction Stop
Write-Output "Renaming SoftwareDistribution and Catroot2 folders..."
$sd = "$env:SystemRoot\SoftwareDistribution"
$cr = "$env:SystemRoot\System32\catroot2"
# Add timestamp to avoid collision
$ts = (Get-Date).ToString('yyyyMMddHHmmss')
Rename-Item -Path $sd -NewName "SoftwareDistribution.bak_$ts" -ErrorAction Stop
Rename-Item -Path $cr -NewName "catroot2.bak_$ts" -ErrorAction Stop
Write-Output "Starting services..."
Start-Service -Name cryptsvc, bits, wuauserv -ErrorAction Stop
Write-Output "Windows Update components reset successfully."
##########################################################################
0 $type={blogger}:
Post a Comment