Americas

  • United States

Asia

How to repair Windows 10 (and 11) in 4 steps

how-to
Nov 22, 202120 mins
Operating SystemsSmall and Medium BusinessWindows

When Windows 10 gets wonky, try this series of repair techniques — in this order — to attempt to set things right.

mechanic wrench fix engine repair
Credit: Thinkstock

Sometimes a Windows 10 system starts misbehaving to the point where repair is needed. This often takes the form of worsening performance or stability, and can originate from damage to, loss of, or corruption of Windows system files typically found in the C:Windows folder hierarchy. When that happens, users would be well advised to break out the following routine to help them set things back to rights.

I initially wrote this story in 2016, but as Windows 10 has evolved over time, some of the steps have changed a bit. I’ve now updated it for the latest versions of Windows 10. That said, most of these approaches also work with Windows 7 and 8 (with slight variations), and the advice here applies almost identically to Windows 11, which Microsoft is gradually rolling out to Windows 10 users whose hardware can support the new OS via Windows Update from October 2021 into early 2022.

The Windows 10 (or 11) repair drill

The idea is to first try the initial step in the sequence. If that doesn’t fix what’s broken, advance to the next step. Keep working through the steps in order until you reach the end, and you are bound to fix the vast majority of problems. (The only remaining step at that point would be to replace the system on which the software is running, and that’s outside the scope of this story.)

The amount of time and effort required for each step goes up incrementally. Some steps involve additional work to restore the prior state of your PC more or less back to where it was prior to taking that step. Thus, the most important bit of advice I can dispense for those who must venture beyond Step 1 is this: make a complete backup of your system to provide a source for files and information that might otherwise go missing. Ignore this advice at your own risk.

But first: back it up before you lose it!

Any time you make major changes to a Windows system, such as installing a major application suite like Microsoft Office or performing an OS upgrade or repair, it’s a good idea to begin that process with a complete backup. The important thing is to use a backup tool that creates an image backup of your boot/system drive. That will allow you to rewrite that drive and restore your system to normal operation should anything go wrong with your changes or repairs. See my article “How to make a Windows 10 or 11 image backup” for instructions.

Step 1: Using DISM and SFC for system repair

Since I wrote the original version of this story, I’ve obtained direct advice from Microsoft that it’s best to run DISM before running the System File Checker, a.k.a. SFC. Hence, I am reversing the order of events for this step. I’ll echo Microsoft and say “Always run DISM first, then SFC second, not vice versa.”

DISM is the Deployment Image Servicing and Management tool. It’s a kind of Swiss Army knife for working with Windows operating system images, both offline and online. DISM can often fix things that SFC can detect but that it cannot itself fix. DISM supports a raft of capabilities with switches and parameters to match, but basic system file repair syntax is reasonably easy (though it often requires multiple passes before it can set things straight).

You must run DISM in an Administrator: Command Prompt window (press the Windows key + X combination and select Command Prompt (Admin) from the resulting pop-up menu) or in an Administrative PowerShell or Windows Terminal session. Here’s some sample syntax (consult the TechNet DISM Technical Reference for all the gory details):

dism /online /cleanup-image /checkhealth

Most of the time when you run this command, the output will find nothing amiss, as shown in Figure 1:

DISM checkhealth command

Figure 1: DISM can check the health of any Windows image. Here, it reports all is well on a production PC.

IDG

The /checkhealth command simply checks the running image (that’s what /online tells it to do) to see if it can detect any damage or corruption. Because it’s only checking file hashes and signatures, this command completes in under one minute on most machines. The good thing about /checkhealth is that it not only tells you if it finds damage but if that damage is repairable or non-repairable. If it’s repairable, you can proceed to the /restorehealth option (covered in the following paragraphs); if it’s non-repairable, jump to Step 2.

If DISM reports that component store corruption is found and is repairable, you should attempt repairs. That syntax reads:

dism /online /cleanup-image /restorehealth

Even if errors were detected in the preceding step, this command should complete successfully. It replaces corrupt or questionable elements in the Windows Side-by-Side (WinSxS) store, reading from a local copy of your Windows image files.

The /restorehealth command can be tricky to use. Because it can actually repair a Windows image, it needs a source from which to attempt such repairs. You can omit the /source option, but if you do, the command will try to grab its files from Windows Update over the internet. This may or may not work, depending on firewall settings on your network.

A safer bet is to point DISM at a known good source for Windows image components on the local machine (or on your local network). This can be a Windows image (.wim) file or a compressed Windows image (.esd, which is used for electronic software downloads of Windows installations, as the file extension is meant to communicate). You can also point to a separate copy of a WinSXS folder (the usual directory path is C:WindowsWinSXS) taken from another PC with similar or identical hardware for which dism ... /checkhealth returns a clean bill of health.

The syntax for image files is where things can get interesting. To point to the install.wim file that shows up in ISO downloads for the Windows 10 installer on a USB flash drive designated L:, for example, you must use the following source specification (which uses the first image it finds inside the .wim file, designated :1):

/source:WIM:L:sourcesinstall.wim:1

To use an ESD file, change the wim items to esd, as shown here:

/source:ESD:L:sourcesinstall.esd:1

If you run into difficulties getting this to work, try adding the /limitaccess switch to your command strings. This stops DISM from attempting to grab source files from Windows Update, which it will sometimes do even if pointed at a local source. If you just can’t get either of these to work, try a WinSXS folder instead.

Note: the version and language for the /source image must be identical to that for the image to be repaired. This may mean using HeiDoc.net, UUP Dump, or Microsoft’s Media Creation Tool to grab the correct Windows 10 or 11 version/build (see my article “The best places to find Windows 10 ISOs” for details on how to use these sources) and creating media or mounting the ISO file to give DISM the right /source from which to work. For Windows 11, check the Windows Insider Preview Downloads page to grab the proper ISO.

Figure 2 shows typical DISM output using /restorehealth:

DISM /restorehealth command successful

Figure 2: Even when DISM /checkhealth finds errors, the /restorehealth option is usually successful.

IDG

Next, it’s time to run SFC, Microsoft’s System File Checker. To quote TechNet, the system file checker “scans and verifies versions of all protected system files.” It can tell you if it finds anything amiss if you enter SFC /scannow at the command line.

As with DISM, you must run SFC from an Administrator: Command Prompt or an Administrative PowerShell or Windows Terminal session. This command takes 5 to 10 minutes to complete, depending on your PC hardware. Unlike DISM, SFC scans and initiates repairs within a single command.

Figure 3 shows sample output when SFC finds files in need of repair. If this occurs on your PC, repeat the /scannow command until it gives the clear bill of health shown in Figure 4.

SFC /scannow command

Figure 3: If SFC finds questionable files, it will repair them if it can. Here, it succeeds.

IDG

/scannow no integrity violations found

Figure 4: Eventually, SFC will report finding no “integrity violations.” You’re done!

IDG

In my experience, 80% of all problems will be solved at this point, so the odds are in your favor that you won’t have to keep going. But if DISM can’t fix your Windows image, or SFC can’t or won’t make repairs to your system files, proceed to Step 2.

Step 2: Try a recent restore point or image backup

A restore point is a snapshot of a Windows PC’s OS state from a specific point in time. If enabled, the Windows System Restore capability can create and maintain restore points on your behalf. To see if this is an option on your target machine, type restore point into the Windows 10 search box. The System Properties window should open to the System Protection tab, shown in Figure 5.

System Properties window with System Restore button

Figure 5: Access available restore points using the “System Restore…” button.

IDG

To look at restore points, you must work through the System Restore wizard. Click the System Restore… button to launch the wizard, then click the Next button on the first pane of the wizard to see a list of restore points available to you. (If you don’t like what you see, or you don’t see something from before your troubles started on this machine, click the Show more restore points checkbox for a complete list of what’s available to you.) Click the restore point to which you would like to revert.

Figure 6 shows the lone restore point available on my test PC.

System Restore wizard available restore points

Figure 6: For this story, I created a restore point named “Test restore point.”

IDG

Because I have only one restore point — I don’t use them much any more, for reasons I’ll explain coming up — I picked that item to show you what appears when you select a restore point in this utility. If you click the Scan for affected programs button it will tell you if any programs or drivers will be affected by rolling back to the restore point you’ve selected. In this case, there’s no impact, as shown in Figure 7. If something were to be affected, it would show up in either the top or bottom list in that results pane.

System Restore wizard affected programs list

Figure 7: The current restore point has no impact. But older restore points will provide a list of drivers and programs that need to be reinstalled if you revert to that restore point.

IDG

It usually takes between 5 and 15 minutes to revert to a restore point. The amount of additional effort to catch back up to where you left off depends on the number of items that need to be installed or updated, as shown in Figure 7. This can take from minutes to an hour or more depending on size and scope.

All this said, I don’t use Restore Points anymore. I’ve run into occasional issues with failed restores, and I’ve seen plenty of discussion in Microsoft Community and TenForums among other users who’ve had similar problems. My preference is to restore an image built using Macrium Reflect (free or commercial; I use both). It’s faster than System Restore, and I’ve never been unable to restore a valid, integrity-checked Reflect backup. You decide what’s best for you; I use Reflect.

Restoring an image backup is much like reverting to a restore point: choose the image (usually by date and time) to which you’d like to roll back, then initiate the restore procedure. For example, Macrium Reflect offers a “Restore” menu, then allows you to browse stored backup files to pick the one you want in an Explorer-based Open window.

If reverting to a restore point or image backup doesn’t work (or you don’t have either of these), it’s time to move on to Step 3.

Step 3: In-place upgrade to current Windows 10 version

This technique essentially involves overwriting the current OS installation with a fresh new copy while leaving your data files, settings, and preferences alone. It means running the Windows 10 installer for the same version/build that is currently running on the machine from inside Windows 10 itself.

To accomplish this, you’ll need installation media for the same edition (Home, Pro, Enterprise, or Education), language (en-US for American English, for example), and build as the currently installed edition. Bittedness must also be identical: 32-bit media for a 32-bit install, 64-bit media for a 64-bit install. (See The best places to find Windows 10 ISOs for info on obtaining the correct Windows 10 version/build from HeiDoc.net, UUP Dump, or the Media Creation tool, and use the Windows Insider Preview Downloads page for Windows 11 builds.) I recommend building an installable and bootable USB flash drive for this purpose; you may need it again sometime. (There’s a great TenForums tutorial on how to do this.)

Before launching into this process, make sure to log in to Windows 10 with an administrative account. Most experts recommend that you disable or uninstall any third-party antivirus or security software (anything other than Windows Defender, in other words) and turn off Fast Boot and Secure Boot in your UEFI firmware settings (if turned on). You can reinstate these items when the install is complete.

Performing an in-place upgrade is easy. Run setup.exe from the USB flash drive, or from the mounted ISO, which should reside on some drive other than the system/boot device. The Windows installer will do the rest and will guide you through the installation process. On the “Ready to install” screen, be sure both “Install Windows 10” and “Keep personal files and apps” are checked. The second checkmark is particularly important because that tells you it’s indeed an upgrade install, which leaves non-OS files and settings (mostly) alone.

The whole process takes 10 to 30 minutes, depending on your PC’s hardware. You’ll need to reestablish your network connection and set your time zone (unless you live in the Pacific time zone where Microsoft has its HQ). For more detailed instructions, including a list of cleanup tasks to perform after the in-place install, see my article “How to fix Windows 10 with an in-place upgrade install.”

Step 4: Completely reinstall Windows 10

If none of the previous steps has fixed Windows, it’s time for a do-over. In this step, you can choose one of two different options for completely reinstalling Windows on your machine — a more draconian approach to restoring operations than any of the previous steps. Whichever method you choose, you’re going to have to reinstall all apps and applications.

Option A: Reset this PC

This repair method rolls your PC back to its built-in recovery image (usually established when the unit gets its initial Windows image and the original system/boot disk layout is established) or a fresh, clean Windows image downloaded from Microsoft’s servers. For something with the ability to change your PC so thoroughly and completely, it’s surprisingly easy to do from an administrative account. Go to Settings > Update & Security > Recovery, and then click the Get started button under “Reset this PC.”

Settings - Update & Security - Recovery screen

Figure 8: Don’t click the Get started button unless you’re ready, willing, and able to rebuild the PC from the ground up.

IDG

The next screen to appear lets you know exactly what you’re in for, and why a reset is properly described as “major” or “draconian” in scope, impact, and effort involved.

reset this pc screen

Figure 9: This is your last chance to bail out on a long process. If you decide to proceed, you can keep personal files, or get rid of  everything.

IDG

Understand what this means: if you reset, you lose all applications and apps installed after the OS made its initial appearance. You can decide whether or not to keep what Microsoft calls your “personal files” (everything in Documents, Downloads, Pictures, Music, and Videos), but everything else will go.

If you proceed with the reset, you’re presented with two options: “Cloud download” grabs fresh, new Windows installation files from Microsoft’s servers, while “Local reinstall” uses your PC’s built-in recovery image. Unless you have connectivity restraints, I recommend the cloud download option to ensure that any issues with your PC’s recovery image won’t carry through to the new installation.

For more details about using Restore this PC, see my article “Windows 10 recovery, revisited: The new way to perform a clean install.”

Reset this PC is convenient and requires no supplementary media, but I prefer the traditional approach of performing a clean Windows 10 installation from a bootable USB drive or mounted ISO, covered next.

Option B: Clean install of Windows 10 from installation media or mounted ISO

This option means starting over with a completely new OS installation. Why might this be necessary? Aside from reasons such as incurable system instability, malware infestation, or problems that take longer to fix than the time is worth, it may be desirable to switch from legacy BIOS emulation to using available UEFI. It might also be desirable to wipe the boot/system drive clean to remove leftover items (recovery partitions, OEM partitions, and so forth) from older Windows versions and let Windows 10 start over with a clean slate.

The good news is that as long as you’ve got a valid Windows 10 key or you’ve upgraded from Windows 7 or 8.1, Microsoft will recognize your PC and permit it to activate itself without requiring you to supply that key again. Nevertheless, if you’ve got access to the key, it’s a good idea to put that file on a USB drive or some other storage media just in case it’s requested. This seldom happens, but should it be needed, it’s good to have. (There’s a great tutorial at TenForums about how to find and record your Windows 10 key and digital entitlements.)

The process for performing a clean install is 99% the same as that for the in-place upgrade from step 3. Just boot from your installation USB flash drive, select Install Now, accept the license terms, and pick the Custom: Install Windows only (advanced) option when it’s presented to you. The rest of the details — and there are many — are all nicely covered in the TenForums tutorial on this subject.

After the installation

Once you complete either the Reset this PC or the “clean install from installation media or mounted ISO” process, you’ll be starting over from scratch. For me, that means reinstalling Office plus all the apps and utilities that I customarily use on a production machine. It usually takes me 8 to 12 hours to work all the way through this process when manually setting up a new production PC, so that’s the worst-case scenario.

Be sure to check out the great Ninite utility, which lets you create a custom menu of common applications and tools that it will then automatically install on your behalf. Ninite covers about half of what I normally outfit my production PCs with, so I still have to download another dozen programs or so to finish up after that. The Ninite selection screen appears in Figure 10.

Ninite selection screen

Figure 10: At last count, Ninite provides auto-install for 90+ commonly-used programs.

IDG

Picking up the pieces after the repair

Hopefully, you’ll never have to venture further than Step 2 in this list. But if you must dig deeper than that, remember to clean up after it’s all over. That means running Disk Cleanup (or some third-party alternative) and making sure all your applications are installed and working. It also means making another backup when you’ve got things the way you want them, so you’ll have it at your disposal should things go south again.

In the meantime, enjoy your repaired and rejuvenated Windows 10 system!

The Windows 11 situation

Pretty much everything I’ve reported here about Windows 10 also applies to Windows 11, which I’ve been testing as part of the Insider Preview program. If you have a Windows Insider account, you can use an ISO from the Windows Insider Preview Downloads page, and you should be able to perform DISM repairs or an in-place upgrade repair install.

In most ways, and all the important ones, repairing Windows 11 is the same as repairing Windows 10. Good luck, and have fun!

This article was originally published in June 2016 and updated in November 2021.