How to Repair Windows using Command Prompt?

Having issues with your Windows Operating system is not new and everybody at some point in their lives does go through this situation. The repair of this problem leads to the spending of huge amounts of money to the technician. Sometimes things are so complicated that the technician also fails to resolve the issue. What if you can become the doctor of your computer and there is no need for anybody to help you in diagnosing the problem associated with the computer. Yes, it is possible with the help of certain commands that we need to feed to the computer through the Command Prompt. These commands require no prior knowledge of any kind of programming and can be implemented by any person out there who is facing computer related issues. One major thing to note here is that the issues that we will be solving are not related to any kind of virus or malware attack and therefore should not be practiced in those situations. Otherwise, you are good to go. So, let’s start repairing our Windows Operating System.

Necessary Working Steps

  • Step1: Open your command prompt by typing cmd in the windows search bar. Once the cmd application as Administrator gets displayed just run it as an administrator.
  • Step2: Once done, the command prompt will open up for you. It is a black screen application where developers perform their coding, debugging stuff.
  • Step3: Here just type sfc /scannow and press Enter. This will start a verification scan of the system and will try to diagnose the problems associated and then solve the same.

scan windows problem to fix them using command terminal

  • Step4: The process may take a few minutes depending upon the speed of your system. After the scan is finished it will tell you that whether there were any corrupt files in your system or not and will also repair them to give an enhanced performance of your system.
  • Step5: This was one way of repairing your PC with just a single line of code. The other way to do this is by first checking the health of your system by typing DISM /Online /Cleanup-Image /CheckHealth.

DISM /Online /Cleanup-Image /CheckHealth

  • Step6: This will check the presence of any corrupt files in your system and will try to display it to you so that you can remove the same.
  • Step7: After diagnosing the health of your PC you can now type DISM /Online /Cleanup-Image /ScanHealth. This will run a whole system scan and then will try to remove the corrupted files from your system. The process is a bit time consuming but when it finishes, the speed and performance of the computer increase rapidly.

diagnosing the health of your PC using command prompt windows 10

  • Step8: Once you are done with implementing these processes the last thing you can do to get enhanced performance is typing DISM /Online /Cleanup-Image /RestoreHealth.
  • Step9: The restore health feature tries to regain the actual performance of your PC by removing unwanted and suspicious files.

Note: The steps mentioned above are used when there is PC lag or you have suspicious files within the system. Don’t go with these steps if your system is infected by any kind of malware or virus as these may not work.


So, this is how one can repair his/her PC without any external assistance and can improve the performance of the system. Try these commands by yourself and see their magic.