Repair Windows 10 with Command Prompt (4 Methods)

windows 10 command prompt
windows 10 command prompt

Although Windows 10 is one of Microsoft's most trusted operating systems, over time it could malfunction, become infected with malware, or display a blue screen. Therefore, you may need to repair Windows 10 to fix these issues. Fortunately, there are different ways to repair windows 10.

In this article, I explain how to fix Windows 10 using Command Promptbecause it is a foolproof troubleshooting technique.

How to fix Windows 10 using SFC?

SFC (System File Checker) is a command line utility that scans all protected system files and replace damaged files with a full copy.

When you notice issues on Windows 10, you can use SFC to diagnose and fix the issues. Here is the procedure to follow:

  • Open Start , look for thecommand prompt, select it and run as administrator. To do this, in the Windows search bar, enter "commands", right-click on it and click on Execute as administrator.

  • Then type the command: sfc / scannow and press Starter.
  • The verification will start, wait a bit. Finally, any errors will be corrected automatically in the event of a problem.

Be aware that the SFC tool is limited since it only scans system files, especially DLLs. If your problem is caused by a driver or an error in the registry, it will unfortunately not be able to help you.

In this case, you can use DISM to repair Windows 10 image.

How to fix Windows 10 using DISM?

DISM checks the integrity of Windows in order to fix corrupted images. The utility can be used to repair and prepare Windows images, including Windows recovery environment and Windows installation. Likewise, DISM can be used to repair the recovery image in an operating system installation and even to repair a virtual hard drive.

Here is the procedure to follow for repair Windows 10 using DISM commands:

  • To check if there is corruption, run the command line as administrator, then type the following command and press "Enter."

DISM / Online / Cleanup Image / CheckHealth

  • To scan the Windows image for any corruption, type the command below and press "Enter."

DISM / Online / Cleanup Image / ScanHealth

  • To fix the Windows image, type the following command and press "Enter."

DISM / Online / Cleanup-Image / RestoreHealth /Source:repairSource\install.wim

 Reset Windows 10 with the command line

The Reset this PC feature can restore Windows to its factory default state.

To reset windows 10, follow the instructions below:

type systemreset -cleanpc in a command prompt and press Enter. (If your computer cannot start, you can boot into recovery mode and select Troubleshoot, then choose Reset this PC.)

Two options are provided, Keep my files et Delete all. You can then select the option you need to reset your PC.

Start System Restore with Command Prompt

If the problem is too serious, you can try to restore your Windows 10 to the previous state as long as you have enabled System Restore.

System restore fromWindows 10 command prompt is a very useful way when your system crashes or cannot boot.

System Restore allows you to restore Windows to an earlier date where everything was working fine, to make your computer normal. It does not affect personal data or files, such as emails, documents or photos.

To run System Restore on Windows 10, follow the steps below:

  • Open the command prompt. For that type cmd in the search box and launch Command Prompt as administrator.
  • Once the command prompt is displayed, first enter rstrui.exe  and press Starter. This command will take you to the System Restore interface.
  • Choose a restore point. Select a date on which, or before which, you know your computer was functioning properly, and click Next.
  • You will get a confirmation window. Click Finish to start the restore process. The computer restarts automatically.