Almost every DISM command follows the same three-part pattern: choose a target, name the servicing group, then give the operation. For Windows repair on the PC you are using, that means DISM /Online /Cleanup-Image /RestoreHealth. Once you recognize the pattern, most of the syntax becomes a matter of swapping one word, not memorizing a list. This guide gives you that pattern, the repair switches you will reuse, and the handful of options that deserve a warning before you run them.
Start with the target: running Windows or an offline image
DISM (Deployment Image Servicing and Management) is a command-line tool for servicing Windows images. It is installed with Windows and is also distributed in the Windows Assessment and Deployment Kit (ADK). Before you type anything else, decide what you are servicing, because that choice sets the first argument of the command:
As an Amazon Associate I earn from qualifying purchases.
| Target | Selector to use | Typical situation |
|---|---|---|
| The Windows installation you are running | /Online |
Repairing the PC you are logged into |
| An offline Windows image on disk | /Image:<path_to_image_directory> |
Servicing a Windows installation that is not booted, such as a mounted image during deployment work |
The general shape is:
DISM.exe {/Image:<path_to_image_directory> | /Online} [dism_global_options] {servicing_option} [<servicing_argument>]
The selector comes first, followed by the servicing option and its arguments. Run DISM from an elevated Command Prompt or PowerShell window. Not every option works on every target, and support also varies by Windows version, so check Microsoft’s reference for the exact option before relying on it in deployment work.
Quick wins for a faster PC:
Repair Windows errors before they cause bigger problemsFix Now →Scan for outdated or missing drivers - takes under a minuteDriver Scan →Clear out junk files and repair common Windows errorsFree Scan →The repair switches you will actually reuse
The repair operations all sit under /Cleanup-Image. Three of them are easy to confuse, and they are not interchangeable labels:
#1 Best Overall
| Switch | What it does |
|---|---|
/CheckHealth |
Reports whether the image has been flagged as corrupted, and whether that corruption can be repaired. |
/ScanHealth |
Scans the component store for corruption. It does not perform repairs. |
/RestoreHealth |
Scans, then performs repair operations automatically. Expect this to take several minutes. |
Source: Microsoft Learn repair and image-servicing documentation for DISM. Commands:
DISM /Online /Cleanup-Image /CheckHealth
DISM /Online /Cleanup-Image /ScanHealth
DISM /Online /Cleanup-Image /RestoreHealth
For an offline image, replace /Online with the image selector:
DISM /Image:C:offline /Cleanup-Image /RestoreHealth
A safe repair sequence for the running PC
- Run
DISM /Online /Cleanup-Image /CheckHealth. If it reports no corruption flag, you may not need a repair at all. - If you want a scan without repairs, run
DISM /Online /Cleanup-Image /ScanHealthand read the result. - If corruption is reported, run
DISM /Online /Cleanup-Image /RestoreHealth. Let it finish; it can take several minutes. - Restart if the operation asks you to, then run the health check again to confirm the result.
Microsoft’s repair guidance also mentions sfc /scannow as a way to check system files on an online image. Treat it as a related system-file check rather than a substitute for DISM’s component-store repair. If you run both, DISM’s /RestoreHealth is the step that repairs the component store that SFC relies on.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Choosing a repair source
By default, an online /RestoreHealth can obtain replacement files from Windows Update. Two options change that behavior:
/Source:<filepath>points DISM at known-good repair files. The source must correspond to the same Windows image you are repairing. Do not assume that any arbitrary Windows folder or installation medium will work./LimitAccessstops DISM from contacting Windows Update for repair of an online image.
| Scenario | Repair source | Is /LimitAccess needed? |
|---|---|---|
| Online repair with default settings | Windows Update | No |
| Online repair using a known-good copy you supply | The path given to /Source |
Yes, if you want to block Windows Update as a source |
Microsoft’s example uses the Windows directory of a mounted image as the source:
DISM /Online /Cleanup-Image /RestoreHealth /Source:C:testmountwindows /LimitAccess
Command families beyond repair
Repair is only one of DISM’s jobs. The other families follow the same selector-first pattern, but each has its own limits.
Rank #3
Packages and features
DISM can list and service packages and Windows features. The package options include /Get-Packages, /Get-PackageInfo, and /Add-Package. Feature operations, such as /Get-Features and /Enable-Feature, follow the same pattern. Which package types apply depends on the Windows version and the package itself, so confirm against the reference for your release.
The Tool Desk
Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Drivers
/Get-Drivers lists driver packages. /Add-Driver adds third-party driver packages to an offline image, and the documented input is INF-style driver packages. DISM’s driver commands do not accept Windows Installer packages or vendor .exe installers, so do not point /Add-Driver at a setup program.
DISM /Image:C:offline /Add-Driver /Driver:C:driversmydriver.inf
Image management
DISM also manages whole images: mounting, applying, and capturing. Capturing can produce a WIM file or a split SWM set. The documented capture option does not capture a VHD or VHDX file. Full deployment workflows are beyond this reference, so use Microsoft’s image-management documentation for those steps.
PowerShell equivalents
If you prefer PowerShell, DISM’s health operations are available as cmdlets. Microsoft maps the following:
Repair-WindowsImage -ScanHealth
Repair-WindowsImage -RestoreHealth
These correspond to /Cleanup-Image /ScanHealth and /Cleanup-Image /RestoreHealth. Running them from an elevated PowerShell session is the usual approach.
Commands to use with care
Do not run /StartComponentCleanup /ResetBase as a routine way to free disk space. Microsoft’s package servicing documentation states that after you run /StartComponentCleanup with /ResetBase, installed Windows updates can no longer be uninstalled. Other cleanup options may be safer for everyday use, and the exact options available vary by Windows version, so read the Windows 11 version of the command reference before you run any cleanup switch.
Best Value
Keep this distinction in mind as well: the health switches in this guide read and repair the component store, while cleanup switches change what is retained. They serve different purposes, and a repair does not need a cleanup.
Also check your version assumptions. The syntax above reflects Microsoft’s current command reference for Windows 11. Older releases may support fewer options, so if a command returns an unrecognized-option error, look up the option for your specific Windows build.
Finally, keep the target straight. Most mistakes come from running an online command against an offline image or the reverse. Before you press Enter, confirm whether you wrote /Online or /Image:.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




