Top Methods to Repair Windows 10, 11 Using Command Prompt

Read this detailed post to learn a step-by-step tutorial about how to repair Windows 10, and 11 PC startup problems or blue screens using Command Prompt easily. So you can fix Windows 10/11 computer errors like startup errors or BSoD using the command prompt with the help of SFC, DISM, System Restore, etc.

Ivy

By Ivy Updated on June 14, 2024

Share this: instagram reddit

User case: Is there a way to repair Windows 10?

“ I tried running the startup repair but the system says it can't fix the problems.  Is there any other way to fix Windows without losing everything?  I don't have the installation media because the company that did the installation kept it and I don't have a recovery USB either. Any help would be greatly appreciated.”

– Answers.Microsoft

How do I repair Windows 10/11 with the command prompt?

When there is some problem happening to Windows, you can repair your Windows with some basic repair methods like Windows directory repair, and boot directory repair. When the error is too serious, you can run advanced repairs like system restore. For Windows 10/11, you can also use the DISM command line utility to repair the Windows 10/11 image.

👉1. How to restore Windows using the AOMEI.exe command

Repair Windows 10 using Command Prompt

Next, this article will introduce you to how to repair Windows 10 from Command Prompt with useful methods. Note that you can easily open cmd if the Windows loads normally. In this case, try the following methods:

#1: Enable safe mode with command prompt. In Windows 10/11, hold the Shift button and click Restart, then select 6 or use F6 to enable the command prompt under safe mode. Or shut down your computer completely and restart, then hold the Power button when it starts to load Windows. Repeat this process 3-4 times and select the option to enable the command prompt. 

Select Command Prompt

#2: Access the command prompt from the recovery environment. In Windows 10/11, click StartSettings > Update & Security > Recovery > Advanced startup and then Restart now to boot into the recovery environment. Then, click Troubleshoot > Advanced options > Command Prompt or directly press Shift + F10 to summon it. 

If you cannot access Windows 10/11, insert installation media, set the boot priority for it, and boot into the recovery environment, then select the command prompt in the Advanced options window.

Advanced Options

Overview of the commands used on this page:

✅ AOMEI.exe

To restore Windows with AOMEI Backupper, type-specific AOMEI commands.

✅ DISM

To fix the Windows image, type “DISM /Online /Cleanup-Image /RestoreHealth”.

✅ Reset Windows 10

To reset Windows 10 PC, type “systemreset -cleanpc”.

✅ System restore

To restore the system to its previous state, type "rstrui.exe".

✅ SFC

To fix Windows 10 startup problems, type "sfc /scannow".

1. How to restore Windows using AOMEI.exe command

Prevention is better than cure. It is better to take preventive measures in advance than to solve the problem. Therefore, it is highly recommended to protect Windows 10 with specialized software.

With AOMEI Backupper Professional, you can easily back up or restore Windows 10 either in Command Prompt or with a friendly graphic user interface. Once a disaster occurs, like a system crash or disk error, you may return to normal status in a short time. It also supports restoring Windows 10 to dissimilar hardware, i.e. a different computer.

AOMEI Backupper offers the AMBackup.exe utility, allowing users to create backups via the command line interface or by generating a batch (.BAT) file, particularly useful for unattended and multi-task backups. This command line tool enables users to execute nearly all backup operations supported by the AOMEI Backupper's graphical user interface (GUI).

AOMEI Backupper
Free Backup / Restore CMD Tool
  • Diverse functions: This command line interface enables various functions including backup, cloning, restoration, and more.
  • Additional actions: The AMBackup.exe utility supports tasks such as naming, compressing, splitting, encrypting image files, and backing up data sector by sector.
  • Backup types: Available options include new, full, incremental, and differential backups.
  • Storage options: Backup images can be saved locally to internal or external storage, or remotely to a shared network.
wink Tips:

1. The prerequisite for using the AMBackup.exe utility to restore is that you have created a system image backup with AOMEI Backupper.

2. To recover backed-up images, utilize the AOMEI Backupper graphical user interface (GUI).

Before restoring a system, you can use the Check Image feature to check if the system image backup is intact and without error. Also, you need to learn some parameters you will use, please type"ambackup /?" at the command prompt window to get them.

Backup Command

Then, use the following steps to restore Windows 10/11 using the command prompt (here is AOMEI.exe):

1. Navigate to the AOMEI Backupper installation directory by typing the following command in the command line and pressing "Enter". For example cd C:\Program Files (x86)\AOMEI Backupper.

Note: If you run this command under the Windows PE environment, the drive letters might change.

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.

AOMEI Command

Tips:
· If you need to restore to another computer, the AOMEI Backupper "Universal Restore" feature can make this very easy. For example: Run a system restore in the image named "systembackup1.adi" to partition 0 on disk 0 and perform a universal restore.AMBackup /r /t system /s "D:\system backup\systembackup1.adi" /d 0:0 /x.
· You can access this software quickly without booting the computer with its "Recovery Environment" utility.

Except for the command line interface, you still can use its graphic user interface and the steps are easier. It requires a backup image and be sure it's intact too. Note that if you cannot access your computer, you still need to create a bootable USB (16GB at least) on a working computer.

Select Task

Here are detailed steps to repair and restore Windows 10 with AOMEI Backupper:

1. Launch this software, go to the Restore tab, and choose Select Task.

2. In the Restore window, select the backup image you want to restore, here is system backup, and click Next.

Tip: If there is no system image, you can choose to select the backup image manually. Click Back and then choose Select Image File to browse and select an image.

3. In the image information window, choose Restore this system backup and Restore the system to another location. Then, click Next and select the new hard drive in the next window.

4. Preview the operation summary and click Start Restore.

Tips:
· You may also perform a hard drive clone to upgrade the disk when you encounter a disk error.
· The AOMEI Image Deploy feature saves much of your time and effort in deploying images to multiple computers simultaneously, especially in a company.

2. Repair Windows 10 startup problems 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 Windows 10 startup problems. 

To repair Windows 10/11 using SFC with detailed steps:

1. Open "Start", search for the Command Prompt, select it, and run as administrator.

2. Then type the command: "sfc /scannow" and press "Enter".

SFC

If SFC is unable to fix the problem, the utility probably cannot get the necessary files from the Windows image, which might have broken. In this situation, you can try the next solution.

3. Repair Windows 10 using DISM command

Windows 10/11 includes a command-line utility known as DISM (Deployment Image Servicing and Management). DISM command in Windows 10/11 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.

To repair Windows 10/11 using DISM commands:

  • To check whether there is any corruption, Run the command line as administrator, then type the following syntax and press "Enter".

DISM /Online /Cleanup-Image /CheckHealth

  • To scan the Windows image for any corruption, type the below command and hit "Enter".

DISM /Online /Cleanup-Image /ScanHealth

  • To fix the Windows image, type the following command and hit "Enter".

DISM /Online /Cleanup-Image /RestoreHealth /Source:repairSource\install.wim

DISM Repair Windows 10

4. Reset Windows 10 with command line to start over

If you're unsure why your computer is having issues, resetting your PC in Windows 10 is a good option. This process keeps your personal data but removes all apps and programs, except for preinstalled software. For detailed instructions, click on "Reset Windows 10 PC and keep my files." This can help resolve many system problems effectively.

To troubleshoot Windows 10 using the command prompt in this way, follow the instructions below:

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".)

Reset PC

5. Run system restore with command prompt to fix Windows 10

If the problem is too severe, you can try to restore your Windows 10/11 to the previous state as long as you have enabled the System Restore feature. Please note that it will not restore documents, music, emails, or personal files of any kind, so you need to backup files to external drive to avoid data loss before performing a system restore. 

To run the system restore in safe mode, follow the steps below:

1. If your computer can boot normally, start cmd as before. If not, start your computer from safe mode and enable the command prompt via 6 or F6. 

2. Sign in using an administrator account if needed. Once the command prompt is showing, enter "rstrui.exe" at first in the Command Prompt Window and press "Enter" to continue.

Launch System Restore

3. This command will bring you to the interface of System Restore. Click Next and then choose to use the recommended restore point or a different restore point. Afterward, follow the instructions.

System Restore Next

That's all common methods to repair Windows 10 problems or issues using Command Prompt. They are also suitable for Windows 11 and Windows 7 errors troubleshooting. 

Repair Windows 10 without command

Windows startup repair

If Windows 10 can't boot properly but takes you to the login screen or desktop, your first step should be to use Startup Repair. Windows will attempt to fix the issue, which may take a few seconds to a few minutes. If there is no startup problem, Windows will indicate that it can't find any issues to fix.

Startup Repair 1

1. Access the Windows 10 Advanced Startup Options menu. Press F11 as soon as you power on your laptop, or boot from an install disk, click Next, then Repair. Once your computer has booted, select Troubleshoot.

Startup Repair 2

2. Click on Startup Repair, then Advanced options.

Startup Repair 3

Windows will take a few seconds to a few minutes to attempt to fix the issue. If there's no startup problem, it will indicate that it can't find any issues to fix.

Further reading: How to repair corrupted OS using cmd?

👉Boot from Windows Installation Media: Insert your Windows installation media (USB or DVD) and boot your computer from it.

👉Check Disk (CHKDSK):

  • Type chkdsk C: /f /r and press Enter. Replace "C:" with the drive letter where your operating system is installed if it's different.
  • This command will check the file system for errors and bad sectors on the disk and attempt to fix them.

👉Bootrec Commands:

  • Use Bootrec commands if your boot configuration data is corrupted.
  • Type the following commands one by one, pressing Enter after each:

bootrec /fixmbr
bootrec /fixboot
bootrec /scanos
bootrec /rebuildbcd

👉Reinstall Windows: If none of the above steps work and your system is still corrupted, you might need to consider reinstalling Windows. Be sure to back up your important files before doing this.

FAQs about repairing Windows 10

1. Is there a Windows 10 update repair tool?

Yes, the Windows Update Troubleshooter tool can automatically analyze and fix problems with Windows Update, such as a corrupted download. It can also alert you if there's a pending reboot that is preventing Windows from updating. You can download the tool for Windows 10 from the official Microsoft website.

2. How do I enter Windows 10 repair mode?

To enter Windows 10 repair mode, press the power button to turn on your device. Allow it to fully start up. Then, select Advanced options. On the Choose an option screen in Windows PE, select Troubleshoot > Advanced options > Startup Repair > Restart.

3. How do I force Windows repair?

To force a Windows repair, go to Windows Search and select Change Advanced Startup Options. Restart your computer, click on Troubleshoot, then select Advanced Options, and click on Startup Repair. Follow the prompts to choose an account. The repair process will scan the computer and attempt to fix any startup problems.

Summary

Now you have learned how to repair Windows 10/11 using the command line with useful methods. You can choose one based on your preference to address your specific issue. Additionally, it is recommended to keep backup software like AOMEI Backupper installed on your computer. This software provides continuous protection and ensures your data is safe in case of future problems.

If you're an IT Technician or if you want to protect unlimited computers within your company or deploy images to multiple computers effortlessly, you can pick the AOMEI Backupper Technician or TechPlus edition.

You will be surprised to find that it allows you to copy the installation directory for portable version creation and then you can use it anywhere and anytime. Don't hesitate to try it out!

Ivy
Ivy · Editor
Ivy is an editor of AOMEI Technology, she covers backup & restore,hard disk & partitions management and cloud files transfer and so on for AOMEI. She is an outgoing girl and enjoys helping people find solutions to their problems. She loves traveling, eating, reading and so on. She usually hangs out with friends at her leisure time.