用 SFC 扫描并修复 Windows 系统文件

使用系统文件检查器逐一校验受保护的系统文件,并用完好的副本自动替换损坏的文件。

Windows系统终端诊断低风险
在管理员权限的命令提示符中运行 `sfc /scannow`,即可扫描所有受保护的系统文件并自动修复损坏项。

01命令

命令
$ sfc /scannow

02作用说明

SFC 会按清单逐一核对受保护的系统文件,从 WinSxS 组件库或安装介质中提取完好的副本进行替换。扫描通常需要 5-20 分钟,结束后会在控制台输出结果:未发现完整性问题、已修复损坏文件,或无法修复全部问题。若有未能修复的项,先运行 `DISM /Online /Cleanup-Image /RestoreHealth` 修复组件库,再重新执行 SFC。详细日志位于 `%windir%\Logs\CBS\CBS.log`,可用 `findstr /c:"[SR]"` 过滤出关键记录。

03风险

风险低风险
使用条件Must run in an elevated Command Prompt or PowerShell window (Run as administrator).
!注意: 扫描进行中不要关闭命令行窗口,中途打断 SFC 可能让系统文件停留在修复了一半的状态。

04撤销

✓无需撤销——该命令不会改变持久状态。

05来源

  • sfc | Microsoft Learn
    Microsoft · vendor-doc · 2026-09-17
    依据: Microsoft documents that 'sfc /scannow' scans the integrity of all protected system files and replaces incorrect versions with correct Microsoft versions.
  • System File Checker (sfc) - Windows CMD
    SS64 · technical · 2026-09-17
    依据: SS64 describes the /scannow switch as scanning all protected system files immediately and repairing problems found.

最后验证: 2026-09-17 · 分类: 系统与设置

06相关方案