PowerShell Lab
Build, find and save PowerShell
Reviewed templates and commands with requirements, permissions and risk spelled out. Nothing here runs anything — you copy, review and run it yourself.
Search pages, tools, PowerShell commands and ports
Stop the services, rename the caches and start again — fixes many stuck or failing updates.
1Stop-Service -Name wuauserv, bits, cryptsvc -Force2Rename-Item -Path "$env:SystemRoot\SoftwareDistribution" -NewName 'SoftwareDistribution.old' -ErrorAction SilentlyContinue3Rename-Item -Path "$env:SystemRoot\System32\catroot2" -NewName 'catroot2.old' -ErrorAction SilentlyContinue4Start-Service -Name wuauserv, bits, cryptsvcClears update history shown in Settings (the installed updates themselves stay). Delete the .old folders once updates work again.