
In this article, I’ll introduce two methods for repairing Windows when it’s unstable or behaving erratically.
These commands scan Windows for corrupted system files and restore them if any are found.
I think it’s worth trying this before you restore or reinstall Windows. I actually do this from time to time, even when there aren’t any specific issues. Since I always forget the commands, this is just a note for my own reference.
Please note: Proceed at your own risk.
Check Windows regularly to keep it stable. If you notice even the slightest unusual behavior, give it a try
Run DISM.exe
DISM checks and repairs the system image. DISM downloads the necessary files from Windows Update and replaces any corrupted files. Therefore, the process may fail if you are not connected to the Internet.
First, launch Windows PowerShell as an administrator.
Right-click the Start button and select “Windows PowerShell (Admin) (A).”
When prompted for permission, select "Yes."
Enter the following command in Windows PowerShell and run it.
DISM.exe /Online /Cleanup-image /Restorehealth
Running this command will use Windows Update to provide the files needed to repair the corruption.
Be sure to leave a space between the "/" characters.


The scan and repair will begin. Depending on your computer’s performance, this may take a little while. Please wait until it finishes.

If it completes successfully, a message like this will appear.
Note that
DISM.exe /Online /Cleanup-image /ScanHealth
checks the system image. It does not perform any repairs.
Also,
DISM.exe /Online /Cleanup-image /CheckHealth
checks the system image and displays whether the image is healthy, or—if it is corrupted—whether it can be repaired or not. It does not perform any repairs.
Run `sfc /scannow`
Next, enter and run the following command:
sfc /scannow

The `sfc /scannow` command scans all protected system files and replaces any corrupted files with cached copies from the compressed folder on the system.
Depending on your machine’s performance, this may take a few minutes. Wait until it finishes.

If it completes successfully, a message like this will appear.
exit
Type this to close the Command Prompt.
To be on the safe side, restart the computer.
That concludes our guide on how to fix issues without using a Windows installation disc or similar media.
If you try this occasionally, `sfc /scannow` may detect corrupted files, so I recommend running it from time to time.
Summary
- Type `DISM.exe /Online /Cleanup-image /Restorehealth` into the Command Prompt to repair the system image using Windows Update.
- Type `sfc /scannow` into the Command Prompt; if any corrupted files are found, replace them with the cached copies in the compressed folder on your system.
This method won’t work if Windows won’t even boot, but I recommend checking your system periodically before it gets to that point.
よろしければ応援お願いします
