Recovering Windows 10 files through the command line.

In Windows 10, it is quite possible to perform a system restore from the graphical interface, but there are cases when it is more convenient to use "Command line" or there are no more alternatives left. Performing a system restore using this tool is not as difficult as it seems.

Recovery process

Conventionally, it can be divided into three types, each of which will be applicable in a given situation. It should also be taken into account that to successfully restore the system, you will need either a previously created “Restore Point” or a Windows 10 installation image recorded on a flash drive, which will be something of a replacement "Restore Points".

Stage 1: Recovery Environment

In this case, it is assumed that you can start the system and perform certain manipulations in it. However, the launch "Command line" will still come from the special mode. Since recovery without creating a backup copy or image of Windows will be impossible, you must first make preparations.

So, if you are unable to interact with the operating system from its interface, then use the following instructions:

  1. Click on the button "Start".
  2. Here you need to click on the power button, and then while holding down Shift click on the item "Reboot".

  3. The computer will restart in a special mode. Select an option "Troubleshooting".

  4. A window will open "Diagnostics". Here you need to click on "Extra options".

  5. In the next window, open "Command line" by selecting the appropriate item.

  6. Now you need to enter commands to determine the system drive and its health. Please understand that the name of the system disk in "Explorer" And "Command line" may vary. You need to use the name from "Consoles". First, find out which local volumes are healthy. Enter the command: diskpart and click Enter.
  7. You will see all available local volumes and their status.
  8. To find out which one is the system one, you need to enter the command: list volume and press Enter.
  9. A list will appear with all hard drives and their characteristics. You need to find the system disk among them, based on the data provided (total volume size). Write down the letter of this drive somewhere.

  10. To exit disk browsing mode, enter the following command: exit and click Enter.
  11. Now you need to create the backup itself. To do this, enter the following command dism /Capture-Image /ImageFile:D:\Win10refr.wim /CaptureDir:E (here instead of “E” there can be any other letter, depending on the name of your system drive in the “Command Line”):\ /Name:"Windows 10" . Click Enter for use.

  12. Wait until the copy is completed.

If you can open "Command line" in the Windows interface, the instructions for creating a backup copy using it will differ from those described above:


Stage 2: Start recovery

Starting the recovery process in Windows 10 via "Command line" as follows:


Thus, you can not only start the operating system recovery procedure from "Command line" in Windows 10, but also create a backup copy of it. If you don't know how to use "Console", then it is best to do a system restore through the GUI.

Operating systems can sometimes fail and Windows 10 is no exception. The new OS, like previous builds, may not load for a number of reasons.

  • Software failure due to incorrect installation of drivers and utilities.
  • Or a malicious attack when the boot sector on the system is damaged.

Often, when problems arise with loading the operating system, users make a decision. Although you can solve the problem with loading Windows 10 without reinstalling the OS, but simply restore the boot record.

Recovering Win 10 boot sector via command line

Before restoring Windows 10 via the command line, you need to prepare bootable media: or.

  • We insert our bootable media and reboot the computer. You must boot from this media.

In each individual case, when booting from installation media, the method may differ. But in most cases, computers use the key Esc to download Boot Menu and here select the media.

  • When the Windows 10 installation window appears, on the first screen we need to click the " Further».

  • Then select " System Restore».

  • The recovery menu will open, where you need to select “ Diagnostics" or " Troubleshooting».

  • Further, in the section “ Extra options", we are interested in the item " Command line».

But first, you can try the built-in boot tool. This utility, in automatic mode, can restore Windows boot. Everything is quite simple here, we select our operating system (if, for example, there are several of them installed on the computer). Often, this recovery method works successfully, and Windows boots in normal mode after recovery.

  • But in some cases, only manual bootloader recovery using the command line will help. We launch the command line, it opens in the usual window we are familiar with. And here you need to enter the command bcdboot.exe (in small Latin letters), then a space. Next, you need to specify the system drive letter, in our case it is ( D) - this is what the command will look like:

bcdboot.exe (drive letter) :\Windows

How to find out the drive letter

  • To find out which letter we need, before starting recovery, type the command:

diskpart - click Enter

  • Next, when the tool starts DISKPART, you need to enter the command:

list disk

  • Information about the available disks will open; based on the size, we can determine which one we need. Next, you need to open detailed information about the system disk with the command:

sel disk 0

  • When a message appears that disk 0 has been selected, enter the command:

detail disk

  • In the information that opens, you can already see what name is assigned to our system disk.

Why are all these manipulations needed? The fact is that in the system our local disk may by default have the letter ( WITH), and on the command line, it can be a completely different letter (In our example, this is the letter D). We found out which letter is assigned to the system drive and now to exit the service DISKPART recruiting a team - Exit and click Enter
We return to recovery and write the command - bcdboot.exeD:\Windows, then click Enter

After you see a message stating that the download files were successfully restored, you can close the command prompt and restart your computer. In fact, everything is much simpler than it seems at first glance. , this is a last resort solution, you can always try to correct the situation using the Windows tools built into the system.
@

So, the new Windows 10 operating system gives its users. What about old, proven interfaces that make working on a computer much easier? For example, you can perform a lot of operations through the command line that are difficult to implement through windows. Naturally, a lot of work has been done to fix bugs in Windows 10. The nomadic chaos from previous versions of systems, such as the pile-up of slabs in the Start menu, has been stopped. Therefore, it was decided to leave the command line.

Of course, such an interface itself is unusual for the typical user. However, it is very convenient to work through the command line once you remember the primitive commands. No need to click the mouse, everything is done by hand. And you can do everything faster with your hands if you develop the skill. Now we’ll tell you how to find the command line in the latest Windows 10 and start working through it.

Instant launch

For advanced computer users, hotkeys have long existed. These simple combinations open any application that you don’t need to search through windows for several minutes. In this case, the command line opens by pressing Win + X. You can also easily right-click on the Start menu in Windows 10. A context menu will appear in which you should select a special item.

Search by search

To make work easier in Windows 10, there is a special search. Yes, the developers have implemented such a function through the image of a magnifying glass on the taskbar. The hand just wants to click on the attractive icon. Let's do it. A search bar will open in which you need to type: cmd. If you need to run as administrator, which is almost always necessary, then just right-click on the search results and select the appropriate launch.

Familiar windows

In Windows 10, there is no escape from the familiar windowed interface. Actually, the system is based on this principle. Therefore, there is an easy way to launch the command line through standard Explorer. Any folder has a File menu, which opens with a mouse click. Naturally, an item with the desired name will appear, where you can open the command line even as an administrator with one click.

In such simple ways, you can open the command line so that you can easily work through it later. How to do this? It is enough to type typical commands online. Of course, you won’t be able to remember everything right away. But if you practice regularly, then after a while your hands will write the necessary commands themselves. After all, the graphical interface not only consumes a huge amount of computer resources, but also loads the human brain with additional information, which is often unnecessary.

The command line is a standard tool in operating systems that is used to enter commands. The specificity of the console allows you to launch the recovery tool, both from the user interface and when the system is damaged.

Creating a copy of the system

It is impossible to restore Windows 10 without a base, which is a user-created image (working) or a system distribution kit.

Since the topic of the article is about rollback via the console, we will use the option of creating an OS image using the command line.

To enter the console, you can use the internal system search or the window that is called up by pressing the WIN + R keys. Enter cmd:

In order to create a folder for storing Windows 10, enter mkdir c:\Imagen-Restaurar. Where:

  • Drive C is the storage location for the copy folder. Set manually by the user. The command allows you to record a copy not only on your hard drive, but also on an external device. To do this, just enter the letter designation of the flash drive/disk;
  • Imagen-Restaurar – the name of the folder that contains the image.

Comment. After entering this command, the console will not give any signals, but the folder will be created. To be on the safe side, check the disk.

The recimg /createimage c:\Imagen-Restaurar command directly creates the image itself and places it in the specified folder.

After entering the command, the procedure for creating a Windows 10 backup is initiated, which lasts on average 20-25 minutes. During this time, it is recommended not to work with the computer. When the process is completed, a characteristic message will appear in the console indicating the successful creation and registration of the recovery image.

A few nuances when working with the command line in Windows:

  • To separate words, do not use a space, do it with a dash (-);
  • While writing a copy, the process may hang at 1% for a long time. This is fine;
  • It is strongly not recommended to change the name of the standard folder, since during a Windows 10 rollback, the image search occurs in specific places;
  • Once the copying process is complete, go to the specified path and check the folder for the presence of the CustomRefresh.wim file. If it is not there, then the copying was unsuccessful.

Restoring Windows 10 using the command line

Despite the fact that the console is a manual recovery method, no special knowledge is needed to carry out the procedure, since the meaning of all commands is written in Russian.

Before you start rolling back, you should insert a disk or flash drive with a copy/distribution and boot from this device. An action selection window will appear, in which you need to click on diagnostics and then go to the additional parameters section:

In the additional settings section, select launch command line:

After this action, a console will appear into which you can enter bootrec.exe. The line will display a list of all possible commands with their detailed description:

Teams solve the following problems:

  • FixMbr (alternative to fixboot) – used when the boot sector of the system HDD is damaged by malware. By entering the command, the system will automatically correct these problems, and the user will be able to log into Windows 10 in normal mode;
  • Bootcfg – designed to solve the problem when there is no boot.ini file. To restore functionality, you must enter a command with the rebuild attribute. The result is Bootcfg/rebuild;
  • CD repair copy SYSTEM C:\windows\system32\config – used when the system config file is damaged. After entering the command, prompts will be displayed in the console. We answer yes to everything by pressing the Y key;
  • Copy J:\i386\ntldr C:\ - corrects the “NTLDR is missing” error, which is associated with the absence of system files. J – drive letter where the image or distribution is located. C is the drive where the system is stored on the computer.

Comment. Each system is to some extent individual, so the user must know exactly the letter designation of the drives of his computer.

Alternative Windows recovery using the command line

If the computer cannot be started in any mode other than safe, and the user does not know how to work with the command line, then you can call the recovery tool through the console.

For this:


Comment. If the operating system recovery procedure was launched while the computer was running in safe mode, it will not be possible to mark all the changes made.

Calling the rollback environment via a line works not only in Windows safe mode, but also in user mode. The command and subsequent actions are completely similar to each other.

recoverit.ru

Restore Windows 10 system via command line

Previously, we wrote about how to perform a system restore by creating a checkpoint. This method is quite simple. But what to do if you cannot roll back the system to an earlier state using the standard method? In this case, using the command line would be appropriate.

Read also: Creating a Windows 10 system recovery disk

Nuances and methods of restoring the Windows 10 system via the command line

Restoring Windows 10 OS via the command line without a previously created image or distribution is impossible. Therefore, if you encounter an error that you cannot fix and you can only roll back the OS through the console, you should use an installation disk or flash drive.

If you plan to roll back Windows 10 via the command line in the future, you should create a backup image of the system. To do this we do the following:

  • Open a command prompt with administrator rights. Press “Win+R” and enter “cmd”.
  • The console will open. Enter “mkdir c:\Imagen-Restaurar”, where C is the drive letter on which the Windows 10 image will be stored, and Imagen-Restaurar is the name of the folder with the copy.
  • Next, enter “recimg /createimage c:\Imagen-Restaurar”. This command creates the image itself and places it in the specified folder. The copy creation process may take some time and may even freeze at 1%. However, there is no need to press buttons or turn off the PC. After copying is complete, you should go to the specified folder and check for the presence of the “wim” file. If it exists, then the image was created correctly.

Now you can use the following methods to restore the system itself.

Method No. 1. Using the bootrec.exe utility

  • Boot from the installation disk. Select “Diagnostics”, “Advanced options”, “Command line”.

  • Enter bootrec.exe in the console. An instruction will appear describing the action of each command.
  1. FixMbr – used in cases where the boot sector of the hard drive is damaged. By entering the command, the program will automatically correct errors and the user will be able to log into Windows 10 as usual;
  2. Bootcfg is a command to solve problems with the missing boot.ini file. To restore Windows 10 functionality, you should enter “Bootcfg /rebuild”;
  3. CD repair copy SYSTEM C:\windows\system32\config – command to fix errors with a damaged config file. After entering it in the console, requests will appear on the monitor screen. You need to answer “Yes” to everything, that is, enter the letter “Y”.
  • Copy D:\i386\ntldr C:\ - command to fix the “NTLDR is missing” error, where D is the drive letter on which the system image is stored, and C is the drive with the operating system.

Method number 2. Restoring Windows 10 with a backup

If you have previously created a system restore point or you have a Windows 10 backup image from which the system can retrieve the missing files, you should follow these steps:

  • Reboot your Windows 10 PC in safe mode with command line support.
  • Launch the console and enter “rstrui.exe”.
  • A standard system restore will start.

If it is impossible to roll back Windows 10 via the command line, you should check the integrity of the bootloader.

SoftikBox.com

Restore Windows 10 System Using Command Prompt

First, let's remember what restoring the operating system through the command line and not necessarily windows 10 gives us, and why this method should be used. Considering that the process of rolling back the system to the last successful configuration is not done for a good mood, but to restore the operation of the machine. It happens that when you start Windows, an endless reset and restart begins, or you see a banner on the entire screen asking you to pay a fine or tax, an update or driver installation was unsuccessful - the list goes on. It is in the above situations that “Safe_mode_with_command-line_support” is required, through which we can restore the Windows 10 system. I would like to start not with the process of bringing our OS back to life, but with something to revive from—a restore point.

Return point from recovery environment

Since we are talking about cmd, we will talk about the possibilities of creating a restore point in Windows 10 via the command line - this is not the only way. Before you start creating a complete copy of the system partition with all its contents - our working version of Windows, you need to restart the person’s computer using the following method:

  • “Start” → Hold and click on “Restart”

  • In the window that appears, select “Troubleshooting”

  • "Extra options"

If you have a password set when logging in and there are more than one accounts, an additional 1 to 2 screens will appear before loading cmd:

  1. Asking you to select an account
  2. Field for entering a password, if it is set in the account

Let's enter the commands in order to make the copy correctly.


Windows 10 has a useful utility - “dism.exe”, which creates an image of Windows and restores the system using the command line, follow the instructions:

Type:

dism /Capture-Image /ImageFile:D:\Win10refr.wim /CaptureDir:E:\ /Name:”Windows 10”

Be patient, the backup copy will be ready.

With this backup created, exit system recovery mode.

Windows backup

You can create a restore point from the command line in Windows 10 itself; to do this, we need to launch the console using hotkeys, follow the instructions:

  • + [X] → “Command Line (Administrator)” → OK

Now we will create a directory for a copy of Windows, enter:

  • “mkdir C:\Imagen-Restaurar” and press [enter]

Nothing will happen after entering - the console will return a response only as a result of completion. Therefore, for 20 to 30 years, avoid any manipulation with the computer.

I would like to note that in order to avoid mistakes, do not put spaces between words, replace “-”; Do not under any circumstances change the names of directories to avoid failure.

Here, “C:” - there will be a copy - choose the recording path yourself, be it an external screw, or another local disk. And “Imagen-Restaurar” is the name of the folder. After the successful completion message appears, make sure “CustomRefresh.wim” is in place; if it is not there, restart and try again.

Launch system recovery from the console

Via the command line, there are two ways to restore the Windows 10 system.

Important! If Windows crashed due to a virus attack, first go to “Safe_mode” (safe mode) and conduct a deep analysis with an antivirus.

  1. If safe_mode is available with the console, press .
  • Enter: “rstrui.exe” → “System_Restore” → item “Restore_an_earlier_computer_state”.

Remember that after recovery you can’t change anything, only after a full recovery you can choose another version that is available.

  1. Depending on where the copy of Windows was recorded, this media must be inserted into the computer and then step by step:
  • Start" → Hold and left click "Restart"

  • Next “Troubleshooting”

  • "Extra options"

  • write “bootrec.exe” → press [_enter_]

A built-in utility that corrects errors with a number of tools, one of which must be specified when starting recovery. Screenshot below.

In addition, on our website you can find:

  • how to restore Windows 10;
  • How to open the command line in Windows 10.

windows10x.ru

Using the command line to restore Windows 10

In Windows 10, since its very appearance, there have been a great many recovery options, for example, system rollback, this is also a kind of recovery, today we will look at recovery methods using the command line, which will allow us to start Windows 10 after a system failure, virus attack or pressing the POWER button at the wrong time. And we’ll start with the simplest (well, maybe we’ll get lucky), I’ll say right away - computer repairs always start with the simplest, gradually moving on to more complex ones. Let's begin.

Method 1 (Safe Mode with Command Line Support)

We start the car by pressing the POWER button (yes, that same one). As soon as the splash screen appears on the screen (or the letters appear), we begin to methodically (with a frequency of 0.5-1 seconds) press the F8 key. If we are lucky and everything is not so critical, then a menu for selecting a boot option will appear on the screen. It consists of several points, but now we are only interested in “Safe Mode with Command Line Support”. Select this item by moving between them using the arrow keys. Having selected it, press ENTER.

Now, if we are even luckier, the machine will continue loading and give us Kazimir Malevich’s painting “Black Square”, but with some inscriptions. If this happens, then quickly rejoice and enter the rstrui.exe command here, after which the System Restore Wizard will start and offer to restore the system to an earlier state. We select the closest point in time, return the system to working condition and enjoy life and the newfound opportunity to play games.

Method 2 (Boot from Disk)

If everything is not so rosy and the system categorically refuses to enter safe mode, even despite the huge piece of cheese lying near the mouse, then things are a little more complicated, then you will have to look for a disk with a Windows 10 distribution cut into it. Where to look? Well, in a desk drawer, downloaded from the Internet, or from the same programmer friend. Disk found? insert it into the drive and boot from it. Most often, the download takes place without any problems, but sometimes the computer may ask you to press Any key and if you don’t have time to do this, you may again see a sad message about the impossibility of the system working.

So, I’ll tell you where this mysterious Any Key is. In fact, on any keyboard it is always located inside the spacebar, so we must have time to press it. Did you make it? Great! Now we wait for the blue screen to load. No, not the notorious BSOD, but just a screen with boot options in which we need to select the “Diagnostics” icon. Have you chosen? And again there are some icons, but there is no need to be afraid of them - after all, we firmly decided to raise the system ourselves, so we are not afraid and click the “Advanced options” icon, where we select the already familiar and not scary Command Line, into which we now enter several commands.

diskpart function

This is where we will begin our treatment, or rather just diagnostics for now. We enter diskpart and press the same ENTER and in general, we press ENTER after entering EVERY command. Having thus launched the diskpart utility, designed for working with disks and partitions, enter the following command list volume, we need it to display information about all disks available in the system. Having received the information we need, we exit the diskpart utility by simply entering exit.

So, we are again on the command line, we have information about partitions in front of us - the result of diskpart’s work, and we see on which disk our sick Windows lives. Most often, this is drive C (although in some cases it may differ, but in this example let it be C), thus, having carried out the diagnosis, we move on to the treatment process itself, for which we will enter a few more commands, the syntax and purpose of which we will now learn about.

  • bcdboot.exe is a utility that restores critical boot files; to launch it, enter bcdboot c:/windows. Upon completion of the program, our Windows 10 becomes healthy, but may not start. This is due to possible damage to the boot sector. So that we do not encounter such a disaster, we will now treat him - whether sick or healthy - for prevention. To restore the boot, we have two more useful commands, now we’ll deal with them. In general, to tell the truth, this is one command, but with different keys, and we will now consider their purpose.
  • The bootrec command, launched with the fixmbr key (type bootrec/fixmbr), restores the damaged MBR, and with the fixboot key (type bootrec/fixboot), in order not to waste time on trifles, overwrites it altogether. At this point, the restoration process can be considered complete.

Now let's repeat the entire chain of actions to restore Windows 10

  • diskpart
  • list volume
  • bcdboot c:/windows
  • bootrec/fixmbr
  • bootrec/fixboot

After finishing the last program, we reboot our computer (and now at least with the RESET button) and now we are completely happy. And, as we see, there is nothing scary left in the command line. Now you can play your favorite games.

secretwindows.ru

Windows system recovery command

System Restore is a tool that will allow you to undo changes that have been made to your operating system since a certain date. Sometimes, however, the problem with your OS is so severe that even the Windows shell won't boot, so you won't be able to run System Restore the normal way. Luckily, all you need to do is download the Command Prompt to run this tool, and in particular, there is an option in Windows Boot Methods that allows you to boot Windows into Safe Mode with Command Prompt support.

If Windows boots up for you, but System Restore does not start through Explorer, you can use the command to start System Restore in the Run dialog box, you can call it with the key combination: Win+R (works in all versions of Windows OS), or:

  • windows 8, windows 10 - using the start menu or the "Power User Menu" context menu;
  • windows 7, windows vista - press the start button;
  • windows xp or earlier - click the start button - execute;

How to run system restore from the command line

The system restore command is the same for all versions of Windows; this instruction is relevant for Windows 10, Windows 8, Windows 7, Winsows Vista and Windows XP. 1. Open Command Prompt if it is not already open 2. Type the following command in a text window or command prompt: rstrui.exe

And then press the Enter button or the OK button, it depends on which method of executing the command you chose. 3. The System Restore window will open. Next, follow the instructions that will be displayed on the screen.

P.S. If you have any problems with your equipment, contact our computer service, or order a visit from a computer technician.

Like her predecessors, she “flies” at the most inopportune moment, everyone knows. In theory, the built-in automated means of rolling back the system to the last working state should work. But the problem is that it doesn’t always work. And in order not to reinstall the system, you have to use system recovery via the command line (Windows 10 is used or another version, it doesn’t matter). The following will provide a step-by-step description of the entire process using several basic methods.

Problems with automatic and manual Windows recovery

So, first, let's look at why the automatic rollback tool doesn't work during critical failures (we're not talking about starting a recovery from a running system right now).

The main problem with trying to automatically rollback Windows to a previous state that was recorded at one of the checkpoints is that damage to the system boot loader at such points is not recorded. That is why the same Windows 10, upon completion of the process, displays a message that the rollback could not be performed and requires an immediate reboot, which, in general, has no effect and leads to the same result.

The same applies to the installation of the latest updates, which Microsoft turned out to be so unfinished that they “killed” many computers around the world, and some began to experience spontaneous reboots. Thus, restoring the Windows 10 system via the command line is almost the latest and only solution that will allow the system to be revived. Many users know about the actions used only by hearsay, and some are even afraid to use the command console. The following instructions will help fill this gap.

Restoring the Windows system via the command line: what is needed for this?

But let's see what tools you need to rollback. Since Windows does not boot in stationary mode, to access the command console you need to start it somehow. But how?

For this, removable media with recovery or installation distributions recorded on them (optical discs, flash drives, etc.) are used. Thus, you need to have such media in stock. If it is not there, you can create a bootable flash drive or disk quite simply on another computer terminal, using the “Recovery Center” section in the standard “Control Panel” or a third-party software package.

Preliminary actions

Now, to restore a Windows system - 7 or another modification - through the command line, you need to log into the command console.

To do this, in the BIOS settings, the removable device is set first in the boot priority, and after the boot menu appears, in order to avoid searching for a long time to start the command line, use the key combination Shift + F10.

Now the first thing you need to do is look at which partition is the system one. The fact is that when starting from a removable media, drive and partition letters may not be displayed, but numbers are used instead. At the command prompt, enter diskpart and list volume in sequence. After executing the second line, you should remember the system partition, and to exit, enter the exit command.

How to run System Restore via the command line?

Now you can begin the rollback procedure. As a rule, only one operating system is installed on user terminals, so to activate the process it is enough to enter the command bcdboot c:\windows.

If two systems are installed on your computer on different partitions, you can run the command twice, but do not forget to specify the volume in which each system is installed.

Note: This command does not work on Windows XP and may not work on some builds of Windows 7.

Alternative recovery method

Windows 10 via the command line can be done in another, no less effective way, which, however, will take more time, but almost always works.

Enter the system partition definition commands again and find the hidden FAT32 partition in the list (for primary UEFI systems and GPT partitions its volume will be up to 300 MB, for MBR in combination with BIOS - about 500 MB). As before, remember the letter or section number.

Now, to start system recovery via the command line, you need to enter the following commands in a strictly defined sequence (we assume that our partition is marked with the letter N):

  • select volume N (select a section);
  • format fs=ntfs (format the partition into the desired file system);
  • assign letter=Z (set a new letter for the hidden section - you can specify it if desired);
  • exit;
  • bcdboot C:\Windows /s Z: /f ALL (set to boot from the system partition, taking into account the hidden one);
  • diskpart;
  • list volume;
  • select volume N (select the previously renamed section);
  • remove letter=Z (remove the volume so that it is not displayed in the system after the restart);
  • exit (exit the console).

After this, you can remove the removable device and perform a full reboot. In theory, the restart should go without problems.

Bootloader recovery: checking system files

However, this approach may not work if records and sectors are damaged. Restoring Windows 10 via the command line in such a situation will have to start a little differently.

In this case, the process involves checking system files and restoring boot records, and if impossible, completely overwriting them.

At the command line, after booting from removable media, as described above, enter the sfc /scannow command.

Actions with boot records and sectors

After it is fully completed, you should check the system starts in normal mode. If the result is zero, you should use the bootrec.exe tool, for which the fixmbr and fixboot commands are first entered, separated by a space and a right slash.

Again, after completing them, you should check the boot in normal mode. If the result is zero, the line rebuildbcd is written for this tool. As a rule, after entering such a line, loading of the operating system resumes. By the way, this is a universal method, and command line recovery of an XP system can also be done using this toolkit.

Recovery via DISM module

Finally, there is another verification and rollback method that uses image recovery. In this case we are talking about the DISM tool (CheckHealth or RestoreHealth).

It can be used in two ways: you can simply run a scan, followed by a rollback, or you can specify a restore immediately. In the same way, you can use two commands in succession if, for example, the first did not give any results. However, it is worth considering that this process of checking and restoring system files should only be used if the SFC tool did not work. If the process stops at about 20%, you can simply reboot the system and use SFC again, which will allow you to replace damaged system files with new ones. In general, this toolkit is considered to be the most last resort when nothing helps at all, although if Windows is very damaged, it may not give the desired effect.

A few final words

The only question that remains unresolved is which method to use to restore the Windows 10 system via the command line. In principle, there is not much difference between them, but you should run a scan or restore system files only if it is impossible to use the first two described options. But it also happens that with critical changes it is impossible to roll back. In such a situation, there is nothing left but a complete reinstallation of the OS.

 

It might be useful to read: