Windows command guide

Windows Repair Report Script for Fast System Health Checks

This page is for the situation where Windows feels wrong but the cause is not obvious yet. Instead of guessing, this report-style script collects quick signals from the system file layer, servicing layer, reboot state, update services, networking, and package manager availability. It helps you decide whether the real problem is corruption, update servicing, a stuck reboot requirement, or something else entirely.

This guide is written around the specific symptom-command match for generate a windows repair report, not as a generic dump of terminal lines. That makes the page more useful for real troubleshooting and reduces the chance of running the wrong repair step.

Reviewed guide Updated 2026-04-21
Elevated Command Prompt
@echo off echo === System File Check === sfc /verifyonly echo. echo === DISM Health Check === DISM /Online /Cleanup-Image /CheckHealth echo. echo === Pending Reboot State === reg query "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing" /v RebootPending echo. echo === Windows Update Services === sc query wuauserv sc query bits echo. echo === Network Summary === ipconfig /all echo. echo === WinGet Version === winget --info pause

Best place to run it

Elevated Command Prompt is the right execution context for this page. Because this repair touches protected Windows state, a normal unelevated shell can return misleading access errors or partial results.

Fast repair workflow

  1. Start from the exact symptom on this page: You are not sure whether the issue is tied to SFC, DISM, Windows Update, networking, or package tooling
  2. Run the primary repair line exactly as shown: @echo off echo === System File Check === sfc /verifyonly echo. echo === DISM Health Check === DISM /Online /Cleanup-Image /CheckHealth echo. echo === Pending Reboot State === reg query "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing" /v RebootPending echo. echo === Windows Update Services === sc query wuauserv sc query bits echo. echo === Network Summary === ipconfig /all echo. echo === WinGet Version === winget --info pause.
  3. This workflow is tuned for this repair, so avoid mixing it with unrelated repair commands too early.
  4. Reboot if the servicing stack or protected files were changed, then retry the original Windows action.
  5. Escalate only after reading the output, usually toward CBS.log, DISM source repair, or Windows Update-specific repair.

Copyable wrapper script

Use this wrapper when you want the page command inside a clearer script block with start and finish prompts.

@echo off echo Run this CMD sequence in an elevated Command Prompt. echo Starting targeted repair sequence... @echo off echo === System File Check === sfc /verifyonly echo. echo === DISM Health Check === DISM /Online /Cleanup-Image /CheckHealth echo. echo === Pending Reboot State === reg query "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing" /v RebootPending echo. echo === Windows Update Services === sc query wuauserv sc query bits echo. echo === Network Summary === ipconfig /all echo. echo === WinGet Version === winget --info pause echo. echo Review the output before closing this window. pause

Verification commands after the repair

These follow-up commands help you check whether the repair actually changed the Windows state that matters, instead of assuming success from a single line.

findstr /c:"[SR]" %windir%LogsCBSCBS.log sfc /verifyonly

What problem this script is trying to solve

It helps when you need a faster first pass across several Windows health areas without jumping between separate commands and forgetting the output.

  • You are not sure whether the issue is tied to SFC, DISM, Windows Update, networking, or package tooling.
  • You want one report before trying deeper repair steps.
  • You need a cleaner starting point before opening logs or running riskier commands.

How the script works

The script runs read-first checks where possible. It verifies protected file state, checks the component store health status, looks for a pending reboot flag, confirms core update services, prints a network summary, and checks whether WinGet responds normally.

When it makes sense to run it

Use it early in the troubleshooting flow when the machine is unstable, updates are failing, or you want one compact report before deciding on SFC, DISM, Windows Update reset, or network repair.

Before you run this command

  • Open an elevated Command Prompt or PowerShell window before running @echo off echo === System File Check === sfc /verifyonly echo. echo === DISM Health Check === DISM /Online /Cleanup-Image /CheckHealth echo. echo === Pending Reboot State === reg query "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing" /v RebootPending echo. echo === Windows Update Services === sc query wuauserv sc query bits echo. echo === Network Summary === ipconfig /all echo. echo === WinGet Version === winget --info pause.
  • Confirm that the symptom really matches this guide, especially if you are seeing signs such as: you are not sure whether the issue is tied to sfc, dism, windows update, networking, or package tooling.
  • Keep any exact DISM, SFC, CBS, or Windows Update error output because those details matter in the next step.

What result to expect

After running @echo off echo === System File Check === sfc /verifyonly echo. echo === DISM Health Check === DISM /Online /Cleanup-Image /CheckHealth echo. echo === Pending Reboot State === reg query "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing" /v RebootPending echo. echo === Windows Update Services === sc query wuauserv sc query bits echo. echo === Network Summary === ipconfig /all echo. echo === WinGet Version === winget --info pause, compare the result against the symptom that brought you here. The most useful checkpoint is whether you are not sure whether the issue is tied to sfc, dism, windows update, networking, or package tooling becomes less frequent, changes form, or produces a clearer error message. A command page is stronger when it helps you verify a real change instead of just assuming the line must have worked.

How to verify that it worked

The best verification step after @echo off echo === System File Check === sfc /verifyonly echo. echo === DISM Health Check === DISM /Online /Cleanup-Image /CheckHealth echo. echo === Pending Reboot State === reg query "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing" /v RebootPending echo. echo === Windows Update Services === sc query wuauserv sc query bits echo. echo === Network Summary === ipconfig /all echo. echo === WinGet Version === winget --info pause is to repeat the action that previously triggered the problem. If you want one report before trying deeper repair steps still appears in exactly the same way, the command probably was not the whole answer and you should move to the next targeted check instead of assuming the page is finished.

Why administrator rights matter here

This command changes system integrity and component corruption. Run it in an elevated shell so Windows can apply the repair instead of only returning an access or privilege error.

Before you run it

Run it in an elevated Command Prompt. The script is primarily diagnostic, but some commands can still reveal sensitive local configuration, so only save or share the output if you understand what it contains.

When this is probably the wrong fix

This is not the right first fix for a single third-party app bug, a browser-only issue, or obvious hardware failure. Use it when the symptom points to Windows image health, recurring update corruption, or protected system files.

What to do if it does not help

If @echo off echo === System File Check === sfc /verifyonly echo. echo === DISM Health Check === DISM /Online /Cleanup-Image /CheckHealth echo. echo === Pending Reboot State === reg query "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing" /v RebootPending echo. echo === Windows Update Services === sc query wuauserv sc query bits echo. echo === Network Summary === ipconfig /all echo. echo === WinGet Version === winget --info pause does not improve you are not sure whether the issue is tied to sfc, dism, windows update, networking, or package tooling, move to the next repair step that matches the same symptom family instead of piling on random commands. The best follow-up depends on whether the failure is mainly about system integrity and component corruption.

Frequently asked questions

Should I use @echo off echo === System File Check === sfc /verifyonly echo. echo === DISM Health Check === DISM /Online /Cleanup-Image /CheckHealth echo. echo === Pending Reboot State === reg query "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing" /v RebootPending echo. echo === Windows Update Services === sc query wuauserv sc query bits echo. echo === Network Summary === ipconfig /all echo. echo === WinGet Version === winget --info pause for this exact Windows symptom?

Use it when the behavior on your PC lines up with the repair target on this page: It helps when you need a faster first pass across several Windows health areas without jumping between separate commands and forgetting the output.

What should I check right after @echo off echo === System File Check === sfc /verifyonly echo. echo === DISM Health Check === DISM /Online /Cleanup-Image /CheckHealth echo. echo === Pending Reboot State === reg query "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing" /v RebootPending echo. echo === Windows Update Services === sc query wuauserv sc query bits echo. echo === Network Summary === ipconfig /all echo. echo === WinGet Version === winget --info pause?

Check whether the original trigger still reproduces the same failure. For this page, a useful checkpoint is whether you are not sure whether the issue is tied to sfc, dism, windows update, networking, or package tooling becomes less frequent, changes form, or points you toward a more specific next step.

When should I not rely on @echo off echo === System File Check === sfc /verifyonly echo. echo === DISM Health Check === DISM /Online /Cleanup-Image /CheckHealth echo. echo === Pending Reboot State === reg query "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing" /v RebootPending echo. echo === Windows Update Services === sc query wuauserv sc query bits echo. echo === Network Summary === ipconfig /all echo. echo === WinGet Version === winget --info pause alone?

This is not the right first fix for a single third-party app bug, a browser-only issue, or obvious hardware failure. Use it when the symptom points to Windows image health, recurring update corruption, or protected system files.