When there is some problem happens to Windows, you can repair your windows with some basic repair like Windows directory repair, boot directory repair. When the error is too serious, you can run advanced repair like system restore. For Windows 10, you can also use DISM command line utility to repair Windows 10 image. Next, this article will introduce you how to repair Windows 10 using command prompt with five methods.
Method 1. Repair Windows 10 using SFC
SFC (System File Checker) is a command-line utility that can scan for corruption in Windows system files and replace any corrupted or missing protected system files with a known good version. When you feel buggy with your computer or notice problems during boot, you can use SFC to diagnose problems and repair it.
Run command prompt as administrator. Then type the command: sfc /scannow and press Enter. If SFC is unable to fix the problem, probably the utility cannot get the necessary files from the Windows image, which might have become broken. In this situation, you can use DISM to repair the Windows image.
Method 2. Repair Windows 10 using DISM command-line utility
Windows 10 includes a command-line utility known as DISM (Deployment Image Servicing and Management). DISM command Windows 10 can be used to repair and prepare Windows images, including, Windows Setup, Windows Recovery Environment, and Windows PE. Also, DISM can be used to fix the recovery image within an installation of the operating system.
Let’s see how to repair Windows 10 using CMD with the help of DISM.
To check whether there is any corruption: Run command line as administrator. Type DISM /Online /Cleanup-Image /CheckHealth and press Enter.
To scan the Windows image for any corruption: Type: DISM /Online /Cleanup-Image /ScanHealth
To fix Windows image: typeDISM /Online /Cleanup-Image /RestoreHealth /Source:repairSource\install.wim
Method 3. Reset Windows 10 with command line
"Reset this PC" is a built-in feature of Windows 10. When your computer isn’t running well, you can use this feature to restore it to factory default configuration. To reset Windows 10, type “systemreset -cleanpc” in an elevated command prompt and press enter.
If your computer cannot boot, you can boot into recovery mode and select troubleshoot, and then choose Reset this PC.
Method 4. Run system restore with command prompt
If the problem is too severe, you can try to restore your Windows 10 to the previous state as long as you have enabled system restore. To launch the System Restore from Safe Mode using the command prompt, follow the steps below.
Step 1: Start your computer and press F8 repeatedly until the Windows advanced options menu appears.
Step 2: Click "Safe Mode with command prompt" and press Enter.
Note: If your computer can boot normally, press Win + R and type cmd in the Run box.
Step 3: Sign in using an administrator account if needed. Once the command prompt is showing, type the command: rstrui.exe, then press Enter.
Step 4: This command will bring you to the interface of System Restore. You can either use recommended restore point or choose a restore point. Then click Next. Follow the instruction to complete system restore.
Method 5. Repair Windows 10 with AOMEI.exe
Besides system restore, you can also repair Windows 10 with AOMEI.exe. AOMEI Backupper is a reliable backup and restore software which is designed for Windows 10/8/7/XP/Visa. You can either backup and restore from graphic users interface or command line. It has some features that Windows built-in tool does not have. For example, you can use AOMEI Backupper to create incremental backup, and you can restore to a dissimilar hardware.
Suppose you have created system image backup with AOMEI Backupper, let’s see how to restore windows 10 using AOMEI command prompt. Before restoring system, you can use a utility named Check Image to check if system image backup is intact and without error.
Step 1: Navigate to AOMEI Backupper installation directory by typing the following command in command line and press Enter. For example: cd C:\Program Files (x86)\AOMEI Backupper.
Note: If you run this command under Windows PE environment, the drive letters might change.
Step 2: Run the following command to start restore: AMBackup /r /t [backup type] /s "[backup location path]" /d [destination location]. For example: To restore the system backup saved in J:\systembackup1 to disk 1. You should type the command: AMBackup /r /t system /s “J:\system backup\systembackup1.adi” /d 1
If you need to restore to another computer, AOMEI Backupper Universal Restore feature can make this very easy. For example: Run system restore in the image named "systembackup1.adi" to the partition 0 on disk 0 and perform a universal restore. AMBackup /r /t system /s "D:\system backup\systembackup1.adi" /d 0:0 /x
Now you have learned how to repair Windows 10 using command line with five methods. You can choose one based on your preference. It is also suggested to keep AOMEI Backupper installed on your computer to provide continuous protection.