** Updated 3rd Jan 2019 – To add extra DISM commands and recovery options.
Windows includes a number of tools to get you out of a fix if your computer starts misbehaving. In this post, I’ll run through the repair process.
If you suspect your Windows 10 system may be damaged, the first step is to run the built-in system file checker, known as sfc. Here’s how to use it:
- Right click on the Windows button in the lower left corner of the screen.
- Select Windows PowerShell (Admin). This will open a command-line console with administrator rights.
- To start the system file check, just enter the following: sfc /scannow NB: There’s a space between sfc and /
- This will start a detailed scan of all the systems files and will take a while, so just let it run.
- If all is well, it will report that it didn’t find any corrupt files and you can rest easy and close the console.
- Alternatively, sfc may report that it found corrupt files and fixed them. This is equally good news, so just reboot and all should be fine.
- Often, you will find that sfc says it found corrupt files but couldn’t repair them. In that case, you need some additional help.
The tool to fix this situation is the Windows DISM(Deployment Image Servicing and Management) that’s pre-installed on Windows 10. Before you dive in with this command, it’s worth creating a restore point, here’s how:
- In the Windows search box (lower-left) enter ‘create a restore point‘ and click the control panel result.
- Select the drive you want to protect (normally C:) and click create. That’s it!
- This gives you a recent restore point that you can use if things go pear-shaped!
Once the restore point creation has finished, return to the PowerShell and use DISM to repair the files as follows:
- Open the PowerShell with administrator rights.
- Enter: DISM /Online /Cleanup-Image /RestoreHealth NB: There is a space before each of the /
- In 90% of cases, this will complete successfully and restore any damaged files.
- To confirm all is well, you can run sfc /scannow again.
NB: You may have to complete this process and sfc /scannow a few times before you get a clean sfc /scannow run.
If using DISM produces errors then you should use the following commands from the PowerShell to attempt to repair the source image:
DISM /Online /Cleanup-Image /CheckHealth
Followed by:
DISM /Online /Cleanup-Image /ScanHealth
Followed by:
DISM /Online /Cleanup-Image /RestoreHealth
If you’re still having problems, you will need to download a new Windows 10 ISO image using the Windows Media Creation Tool. This is a free download from the Microsoft Downloads area:
- Once you’ve downloaded the image file to your PC, double-click on the ISO to mount it.
- Next, go to the Sources folder of the ISO and copy the install.esd or install.wim file to a new directory on your C: drive.
- DISM /Online /Cleanup-Image /RestoreHealth /source:WIM:X:\yourDirectory\Install.wim:1 NB: change X:\ yourDirectory to match the location in 2 above.
- If you have an esd image file then use this option: DISM /Online /Cleanup-Image /RestoreHealth /Source:esd:X:\yourDirectory\Install.esd:1
As with the previous tools you may need more than one attempt to fix the problem.
If all the above fails, the next step is to use Windows Upgrade to reinstall the system files (see link below). This option will preserve your documents and installed applications but replace the system files.
How to repair Windows 10 with an upgrade install:
However, if you’ve installed and removed lots of software since you first installed Windows 10, it may be worth wiping the C: drive and doing a clean install of Windows 10.
Leave a comment to let me know if you spot any errors or just find this helpful.
Mike – G4WNC