The latest Windows 11 includes several new features and improvements, and it’s available as a free upgrade for compatible devices. If your device meets the Windows 11 minimum system requirements, you can upgrade and enjoy the latest operating system. However, over time it could malfunction, become infected with malware, or display a black screen with a cursor or a blue screen error. Some users report Laptop freezes after a Windows 11 update or upgrade, or a black screen at startup. There are different ways to fix Windows 11 problems, and in this post, we discuss how to repair Windows 11 and Windows 10 using Command Prompt.
What is a command prompt?
Command Prompt, also known as cmd.exe or cmd, is a Windows utility that lets you execute commands. It can automate tasks, troubleshoot issues, and perform all sorts of functions.
- Press the Windows key + R, type cmd, and press Enter to open Command Prompt.
- Also, you can press the Windows key + S, type cmd, Right-click on the Command Prompt, and select Run as administrator.

Repair Windows 11 Using Command Prompt
You can perform different commands to perform certain tasks. For example, the ipconfig command displays the IP address, subnet mask, default gateway, and DNS address. Again, the shutdown command lets you shut down or restart your computer. Or the Defrag command lets you Defragment the hard drive, reorganizing the files to make data retrieval faster and more efficient, and the DriverQuery command gives you a list of all the drivers installed. Here in this post, we discuss 5 useful commands that help you fix different problems on your Windows 11 or 10 PC. Let’s start
Integrity check with SFC utility
The SFC (System File Checker), a utility somewhat awkwardly called “System File Checker” by Microsoft, to check the operating for corrupted or missing system files. The tool scans the Windows 11 installation folder and detects missing or corrupted components. If it finds one or more incorrect entries, it replaces the affected files with an undamaged version if possible.
It’s the easiest and fastest technique to assess the integrity of your computer, detect problems with installations and updates, and find replacements for missing or corrupted files where possible.
- First, open Command Prompt as administrator. To do this, search for cmd, right-click on Command Prompt, and select Run as administrator.
- Type the command sfc /scannow and confirm with the Enter key.
- After that, Windows 11 will start the system file search – wait for the process to complete.
If the program reports “Windows Resource Protection did not find any integrity violations”, everything is fine. Otherwise, SFC will show you which files have been recovered. In this case, restart SFC. If the repair was successful, you shouldn’t find any more integrity errors.
This is a useful command to run to fix blue screen or black screen problems when Windows 11 freezes or runs very slowly, or when Windows Update fails to install, and more.
Repair Windows 11 with DISM
DISM (Deployment Image Servicing and Management) is a command-line tool and closely related to SFC. DISM commands check and mount image files. As an additional feature, it can also check and repair system files within the Windows 11 component store.
In addition, if, for some reason, the SFC command doesn’t work, or the SFC scan results show that the system file checker found corrupt files but was unable to fix them, you can run the Deployment Image Servicing and Management (DISM) command to repair the underlying Windows system image.
The Deployment Image Servicing and Management (DISM) tool can be used to scan and repair potential issues with the .wim store in Windows that may impact system files.
To run DISM, first open Command Prompt as administrator,
- First, run the command dism /online /cleanup-image /scanhealth and press the Enter key to determine any corruption inside the local Windows 11 image.
- Next, run the command dism /online /cleanup-image /checkhealth that does a more advanced scan to find out whether the image has any problems.
- If there are problems with the system image run the command dism /online /cleanup-image /restorehealth to automatically scan and repair common issues.
Fix disk errors with Chkdsk
Chkdsk (CheckDisk) is one of the oldest repair tools in Windows 11. The utility, available as early as MS-DOS in the late 1980s, detects and fixes a number of file system errors on hard drives and SSDs.
chkdsk is a command line tool checks the file system and file system metadata of a volume for logical and physical errors. Or It verifies the file system integrity of a volume and attempts to fix logical file system errors.
This utility is very useful, especially when you get disk drive errors, high disk usage problems, or Windows stuck on ” Check Disk ” errors at startup.
- Open Command Prompt as administrator,
- Type the command chkdsk C: followed by Enter to launch the tool in read-only mode.
This command chkdsk c: command only search for problems within the file system on drive C: and then displays them to you. Changes to the relevant drive – in our example C: – are not made in read-only mode. By appending the two parameters /f (file system error correction) and /r (sector error correction) you start an error check with a subsequent repair attempt. The full command for this is
chkdsk C: /f /r
If you’re checking the Windows 11 system drive, you must reboot; Chkdsk will run automatically.
Edit partitions using DiskPart
The drive and partition manager DiskPart is one of the most complex and at the same time riskiest command-line tools in Windows 11. It supports experienced users in managing hard drives and SSDs without a double bottom. Many of the functions are also available to you in the Windows tool “Create and format hard disk partitions” in a graphical and therefore less error-prone form.
The diskpart command interpreter helps you manage your computer’s drives (disks, partitions, volumes, or virtual hard disks). You can use this utility to perform simple disk-related tasks, such as creating and deleting partitions and volumes, and complex tasks, such as creating, maintaining, and managing fault-tolerant volumes.
Open the command prompt as administrator, type diskpart, and press Enter to take you to the DiskPart command line. This gives you a hodgepodge of disk-management commands, you can get an overview by typing a question mark (?) and pressing Enter.
Start Driver Verifier
Driver Verifier Manager is designed to detect problems related to broken device drivers. Driver Verifier monitors Windows kernel-mode drivers and graphics drivers to detect illegal function calls or actions that might corrupt the system.
Driver verifier manager is very useful tool to identify problematic drivers, you can also use it to diagnose driver issues with blue screen of death or anything you thing there is a driver problem.
Open the Command Prompt as administrator and type verifier, then press Enter.
Below, the driver check assistant reports a number of check functions that are not self-explanatory. Windows 11 restarts with “Create default settings” followed by “Automatically select all drivers installed on this computer”. It tests the existing drivers. A message about a faulty driver may already be displayed. Otherwise, launch the Driver Verifier tool again and go to “View information about verified drivers”.