Run the command in an elevated context on each device:
DISM.exe /Online /Cleanup-Image /RestoreHealth
Then run:
sfc /scannow
After that, retry Windows Update.
Key points for managed remote laptops:
- The command must run with administrator privileges.
- For online image repair, DISM works best when the device can reach Microsoft Update to download missing or corrupted files.
- If the laptop cannot use Windows Update as the repair source, specify a repair source with
/Sourceand block Windows Update lookup with/LimitAccess, for example:
DISM.exe /Online /Cleanup-Image /RestoreHealth /Source:\\<servername>\c$\windows /LimitAccess
- The repair source computer or source files must match the same operating system version, and the repair source should be patched to the latest cumulative update. If the target OS is patched higher than the source, repair can fail because the required updated files are not present in the source.
- DISM supports
/CheckHealth,/ScanHealth, and/RestoreHealthunder/Cleanup-Image:-
/CheckHealthchecks whether the image is flagged as corrupted and whether it is repairable. -
/ScanHealthscans for component store corruption. -
/RestoreHealthscans and performs repair automatically.
-
- For repeated
0x800f081fcases, that error maps toCBS_E_SOURCE_MISSING, which indicates component store corruption or missing repair source files. - DISM writes details to
%windir%\Logs\CBS\CBS.log.
A practical sequence for deployment through a management agent is:
- Run an elevated command prompt or elevated script step.
- Execute:
DISM.exe /Online /Cleanup-Image /ScanHealth
DISM.exe /Online /Cleanup-Image /CheckHealth
DISM.exe /Online /Cleanup-Image /RestoreHealth
sfc /scannow
- If
/RestoreHealthreturns source file errors, rerun it with a valid/Sourcepath and/LimitAccess. - Retry the update installation.
If a local source is used instead of Windows Update, Group Policy can be used to configure the preferred repair source under:
Computer Configuration > Administrative Templates > System > Specify settings for optional component installation and component repair