Documentation Restructure
All checks were successful
Automatic Documentation Deployment / Sync Docs to https://kb.bunny-lab.io (push) Successful in 5s

This commit is contained in:
2026-02-27 04:02:06 -07:00
parent 52e6f83418
commit 554c04aa32
201 changed files with 378 additions and 47 deletions

View File

@@ -0,0 +1,39 @@
---
tags:
- Windows
- PowerShell
- Scripting
---
## Purpose
Sometimes when you try to run Windows Updates, you may run into issues where updates just fail to install for seemingly nebulous reasons. You can run the following commands (in order) to try to resolve the issue.
!!! info "Run Commands from (CMD) Commandline, not powershell.
```powershell
# Imaging integrity Rrepair tools
DISM /Online /Cleanup-Image /RestoreHealth
sfc /scannow
DISM /Online /Cleanup-Image /StartComponentCleanup
# Stop all Windows Update services (in order) to unlock underlying files and folders.
net stop usosvc # usosvc may refuse to stop on some systems; failure is non-fatal and you can proceed
net stop wuauserv
net stop bits
net stop cryptsvc
# Purge the Windows Update cache folders and recreate them
rd /s /q %windir%\SoftwareDistribution
rd /s /q %windir%\System32\catroot2
mkdir %windir%\SoftwareDistribution
mkdir %windir%\System32\catroot2
# Start all Windows Update services (in order)
net start cryptsvc
net start bits
net start wuauserv
net start usosvc
```
!!! info "Attempt Windows Updates"
At this point, you can try re-running Windows Updates and seeing if the device makes it past the errors and installs the updates successfully or not. If not, **panic**.