FolderRisk: Caution
CBS C:\Windows\Logs\CBS
Component-Based Servicing (CBS) logs: update and feature installation, sfc /scannow results in CBS.log.
What it’s for
CBS.log records everything Component-Based Servicing (CBS) does. CBS is the Windows servicing stack that installs, updates and repairs components, features and updates. The file lives in %windir%\Logs\CBS and also records System File Checker runs (sfc /scannow). For the same kind of problem, DISM.log (in Logs\DISM) traces the DISM layer.
What it contains
CBS.log: a detailed and very verbose log of servicing operations. Each line starts with the date, the time and a level (Info,Warning,Error).- System File Checker entries, identifiable by the
[SR]tag. They cover everysfcrun, so check the dates to find the latest one. CbsPersist_*archives, created when the current log is archived.
Risks and best practices
CBS.logis the first source for diagnosing a failing update or repair, so keep it until the incident has been analyzed.- To read the result of
sfc, extract the[SR]lines to a file instead of opening a large log in an editor. - A folder that grows abnormally points to repeated update installation attempts. Fix the cause, not the log.
- If space runs short, delete the old archives and keep the most recent log.
Useful commands
:: Extract System File Checker entries (elevated command prompt)findstr /c:"[SR]" %windir%\Logs\CBS\CBS.log > "%userprofile%\Desktop\sfcdetails.txt"# Folder content, newest first (read-only)Get-ChildItem "$env:windir\Logs\CBS" -Force | Sort-Object LastWriteTime -Descending | Select-Object Name, Length, LastWriteTime
# Latest errors in the logSelect-String -Path "$env:windir\Logs\CBS\CBS.log" -Pattern ', Error ' | Select-Object -Last 20