Windows Terminal commands for troubleshooting PC problems

Last update: December 2th 2025
  • Windows Terminal centralizes CMD, PowerShell, and WSL into a single interface, ideal for diagnosing and repairing problems when the graphical interface is unresponsive.
  • Commands like SFC, DISM, and CHKDSK operate on different layers (system files, Windows image, and disk) and, when combined, solve most stability problems.
  • Network utilities (ipconfig, netsh, ping, tracert, netstat, nslookup) allow you to detect and fix connection drops, slow internet speeds, and suspicious traffic.
  • A monthly maintenance routine with scripts that integrate these commands helps keep your PC fast, stable, and less likely to require a Windows reinstallation.

Windows Terminal commands for troubleshooting PC problems

If your computer starts running slowly, the Wi-Fi keeps cutting out, you're getting blue screens of death, or Windows is behaving erratically, Windows Terminal and the classic console are your best allies for fixing many of these problems without reinstalling the system. Behind that black window lie veritable Swiss Army knives for diagnosing, repairing, and making your PC run much more smoothly.

In this article, you'll find a comprehensive (and straightforward) guide to key Windows Terminal, CMD , and PowerShell commands for troubleshooting, repairing, and maintaining your PC . You'll learn what each command does, when to use it, see concrete examples for real-world scenarios, and learn how to combine them into a regular maintenance routine to keep your PC running like a champ.

What is Windows Terminal and why is it ideal for PC repair?

Windows Terminal is Microsoft's modern console that unifies CMD, PowerShell, and WSL (a Linux subsystem) into a single window . This means you can switch between these environments using tabs, customize colors and fonts, and have multiple sessions open simultaneously.

The main difference from the classic console is that Terminal offers a more user-friendly interface, autocomplete, and simultaneous access to multiple shells . You can have one tab with CMD for using CHKDSK, another with PowerShell for scripts, and another with Bash if you work with Linux tools.

While CMD focuses on traditional Windows commands and PowerShell on advanced automation and scripting, Windows Terminal acts as a container where you can run them all without switching applications. This makes it especially useful when the graphical interface crashes, Windows doesn't boot properly, or you need to perform serious diagnostics.

Essential commands to get started in Windows Terminal

Before we get into the advanced stuff, it's a good idea to master a few basic commands that will allow you to navigate the system, view important information, and close processes when something gets stuck.

The starting point in any console is `help` . If you type `help` in CMD or PowerShell, you'll see a list of the commands available in that environment, along with a brief description. And if you type, for example, `chkdsk /?` or ` shutdown /?` , you'll get all the modifiers and usage examples.

To navigate through folders, the classic commands are `cd` (change directory) and `dir` (list files and subfolders). ` cd ..` moves you up one level, and `tree folder` displays the entire directory tree.

It is also very useful to use cls to clear the console screen, exit to close it, and type file.txt to display the contents of a text file without opening Notepad.

System Quick Diagnostic Commands

When you suspect something is wrong, the first step is to gather information. Windows includes several commands that summarize the system status, components, and active processes.

The `systeminfo` command displays a quick overview of your computer model, processor, RAM, exact Windows version, BIOS, installed patches, and more. It's perfect for checking program or update requirements.

If you want to see the active processes, tasklist shows you all the running processes and how much memory they're using. And if one gets stuck, you can kill it with taskkill /PID ProcessNumber /F , using the PID you saw in the list.

To inventory drivers, the `driverquery` command generates a list of all installed drivers, their type, path, and date . This is very useful after formatting or changing hardware, or if you suspect a driver is causing crashes and want to learn how to back up drivers.

Another useful feature is using `wmic diskdrive get model,status` to quickly check the overall status of your physical disks . If a disk starts showing problems ("Pred Fail" or other unusual statuses), it's time to back it up as soon as possible.

Network and Internet connection: commands to fix Wi-Fi and latency

Many everyday problems stem from the connection: pages that won't load, Wi-Fi that drops, laggy games… Windows offers several utilities to see what's happening on your network and fix corrupted configurations.

  Preventive Hardware Maintenance

The most basic command is ipconfig , which displays the IP configuration, gateway, subnet mask, DNS, etc. You can use ipconfig /release and then ipconfig /renew to release and renew the IP address, which is useful if you have DHCP conflicts or problems obtaining an address.

When websites stop resolving correctly or Wi-Fi becomes unreliable, running `ipconfig /flushdns` clears the DNS cache, and if necessary, you can edit the hosts file to force local resolutions. This helps resolve name resolution errors and intermittent outages.

To go further, `netsh int ip reset` resets the TCP/IP stack. It's a more aggressive option that usually fixes unstable connections, very slow speeds, or problems caused by malware or improperly uninstalled VPNs.

The triad of ping, tracert (or destination tracert), and pathping allows you to check if a server is responding and what route packets are taking. Ping measures latency, tracert shows the intermediate hops, and pathping combines both to also show packet loss at each stage.

If you suspect intruders or data-guzzling programs, `netstat -ano` lists all active connections, open ports, and remote addresses. This allows you to identify suspicious traffic or services that shouldn't be listening on certain ports.

Finally, nslookup can be used to directly query a DNS server for a domain name, or to do the opposite (resolve an IP address to a domain name). It's very useful for determining whether the problem lies with your connection or your DNS provider.

Commands to check and repair system files: SFC

One of the classic tools for repairing Windows is SFC (System File Checker) , which analyzes protected system files and restores damaged ones using cached copies.

The most common method is to open Windows Terminal or CMD as administrator and run sfc /scannow . This command scans all critical Windows files and replaces corrupted ones with original versions stored in %WinDir%\System32\dllcache.

If you only want to check without making any changes, you can run `sfc /verifyonly` , which simply detects irregularities without repairing them . You also have more specific variants like `sfc /scanfile=Path\file` to focus on a particular file.

When the scan is complete, SFC can return different messages: that it found no problems , that it found errors and fixed them , that it detected damage but couldn't fix it , or that it couldn't complete the operation . In the latter cases, it's usually recommended to run the command in Safe Mode.

Typical symptoms that warrant running SFC include Windows functions that stop responding, system applications that won't open, "file not found" errors in basic tasks , or unexplained instability.

DISM: Repair Windows Image When SFC Isn't Enough

If SFC fails to resolve the problems, the next level is DISM (Deployment Image Servicing and Management) , a tool designed to review and repair the Windows image on which the system is based.

DISM has three key options that should be executed in this order and calmly :

  • DISM / Online / Cleanup Image / CheckHealth: Quickly check if the image has known damage.
  • DISM / Online / Cleanup Image / ScanHealth: performs a deeper analysis and records any corruption detected.
  • DISM / Online / Cleanup Image / RestoreHealth: attempts to repair the image using source files (usually through Windows Update).

These commands can also be run in Windows Terminal or CMD with administrator privileges. ScanHealth and RestoreHealth can take several minutes, even more than an hour depending on the system's condition and disk speed, so please be patient.

If Windows Update is not working or is broken, you can specify an alternative source with something like DISM /Online /Cleanup-Image /RestoreHealth /Source:C:\RepairSource\Windows /LimitAccess , pointing to a folder with the Windows installation files (mounted ISO, network, etc.).

When to use DISM: when errors occur while installing updates, strange system application crashes, recurring problems that SFC does not fix , or messages related to the Windows image.

CHKDSK: Analyze and correct errors on the disk

The third pillar for repairing serious problems is CHKDSK (Check Disk) , a veteran that remains essential for checking and repairing physical and logical errors on the hard drive or SSD.

The typical usage would be something like chkdsk C: /F /R , where:

  • /F It indicates that an attempt should be made to correct the errors detected.
  • /R It searches for defective sectors, attempts to recover readable data, and marks them for non-use.

If you scan the drive where Windows is installed, the system will usually tell you that it can't lock it at that moment and ask if you want to schedule the scan for the next restart. Say yes and restart whenever it's convenient for you.

  HDMI soundbar detected as a monitor: causes and solutions

CHKDSK performs several phases: first, it checks the file system structure; then, it checks for inaccessible names, links, and folders ; and finally, it checks security descriptors. Upon completion, it displays a report with errors found and repairs performed.

In addition to /F and /R, NTFS volumes offer other advanced modifiers such as /scan, /spotfix, /perf, and /sdcleanup , designed for faster online scans, spot fixes, or descriptor cleanup . These are useful in more technical environments.

Clear signs to use CHKDSK are very slow startups , recurring blue screens, files disappearing or becoming inaccessible , and any indication that the drive may be starting to fail.

Differences between CFS, DISM and CHKDSK and how to combine them

Although all three are run from the console, each one attacks a different layer of the system , and knowing this saves you time and trouble.

SFC focuses on protected Windows files . It's the first command you should try when you notice minor glitches, system apps that won't open, features that stop working, or small bugs.

DISM works on the Windows image . It comes into play when SFC cannot repair certain files or when there are problems with updates, deeper corruption, or internal maintenance errors.

CHKDSK doesn't touch system files or the image; instead, it directly checks the disk's status and file system structure . It's the tool you should use if you suspect the problem lies with the storage: bad sectors, power outages, laptop damage, random blue screens , etc.

A highly recommended sequence when your PC becomes unstable is: 1) CHKDSK on the system drive, 2) DISM with CheckHealth, ScanHealth, and RestoreHealth, 3) SFC /scannow . This sequence covers the disk, image, and protected files.

Performance optimization with advanced commands (memory, timers, and power)

Besides repairing, the console can also be used to squeeze a little more performance out of the system, especially in gaming or heavy tasks , as long as you know what you're doing.

Using `fsutil behavior query memoryusage` lets you see how Windows is using memory for file caching. Then, using `fsutil behavior set memoryusage 2` tells the system to prioritize cache performance, which can improve performance in games or disk-intensive programs.

In the realm of timers, commands like `bcdedit /set useplatformtick yes` and `bcdedit /set disabledynamictick yes` force a stable hardware tick and disable dynamic frequency switching . This can reduce small latency variations, something highly valued by demanding gamers.

For power management, the powercfg command is invaluable. For example, powercfg /batteryreport generates a detailed HTML report with charge cycles, battery degradation, usage times, and recommendations —ideal for laptops that no longer last as long as they used to.

You can also use `powercfg /energy` to get a report on your computer's energy efficiency, indicating devices that prevent sleep, misconfigured options, or drivers that consume excessive power . If you also want to improve productivity with tweaks and tricks, combining these metrics with system settings can make a significant difference.

Disk management, partitioning, and storage maintenance

When the problem is in storage, in addition to CHKDSK it is advisable to know other tools such as diskpart, defrag, format, convert or fsutil , which allow you to manage partitions, format and check advanced aspects of the file system.

diskpart is extremely powerful and, if misused, very dangerous. With commands like list disk , select disk N , and clean, you can completely erase a disk without prompting for confirmation . It can also be used to create and delete partitions, assign drive letters, work with virtual disks, and even merge two NTFS partitions in certain scenarios.

The defrag tool performs defragmentation on mechanical disks, which can improve performance on HDDs but is not useful on SSDs . It is used with parameters like `defrag C: /U /V` to view progress and a detailed report.

With convert D: /FS:NTFS you can convert a FAT drive to NTFS without formatting it, which is useful for older or removable disks that you want to adapt to modern Windows features.

fsutil, on the other hand, allows you to see information about volumes, mount points, free space, and other advanced details, intended more for administrators and advanced users who want to fine-tune the behavior of the file system.

  Windows 3.1 and 3.11: History, Features and Legacy of a Classic

Organizing files, processes, and small console tricks

The command line also speeds up everyday tasks such as copying data, cleaning folders, renaming files, or automating backups without opening a single browser.

Traditional commands like copy, xcopy, robocopy, move, del, md, ren, and type allow you to mount everything from backup scripts to periodic cleanups of temporary folders . For example, robocopy C:\Source D:\Destination /E is a robust option for synchronizing directories, including subfolders.

To manage automated tasks, you can use schtasks , which schedules the periodic execution of scripts or applications . It's the foundation for setting up regular maintenance without having to remember to do it every month.

And if you need to run an application with other permissions, runas /user:User "command" lets you launch programs as another user, as long as you have the password, which is useful in shared computers or work environments.

Finally, to make working in the console more convenient, commands such as color, title, prompt, cls, or cmd allow you to customize colors, change the window title, adjust the prompt, or quickly open new sessions.

Monthly maintenance routine with scripts and automation

The real magic happens when you turn all these commands into a regular maintenance routine , instead of only using them when your PC is already sluggish.

A reasonable frequency is a complete check-up every 4-6 weeks , provided the equipment isn't experiencing serious problems. This check-up can include:

  • Disc review with chkdsk C: / F / R (and in other units if you use them a lot).
  • Image check with dism /online /cleanup-image /CheckHealth and, if there are any warnings, / Scan Health y / RestoreHealth.
  • System file scan with sfc / scannow.
  • Battery report with powercfg / batteryreport if you use a laptop daily.
  • Memory and timer check with fsutil behavior query memoryusage y bcdedit if you're worried about latency.

All of this can be put into a simple .bat file so you don't have to go command by command. You save the file, run it as administrator, and let it do its job while you have a coffee . You can even schedule its execution with schtasks.

If you want to go a step further, you can complement this routine with graphical tools such as Task Manager, Resource Monitor or third-party applications (HWMonitor, CrystalDiskInfo, etc.) to monitor temperatures, disk health and consumption.

When there is no other option but to reinstall Windows

However good SFC, DISM, CHKDSK and the like are, there are situations where neither these commands nor the built-in troubleshooters will restore complete stability.

If after running these tools several times the errors return, the system continues to boot poorly, or the crashes are continuous , the installation may be so corrupted that the most sensible thing to do is to perform a clean reinstallation of Windows.

It is also advisable to start from scratch when you have suffered serious malware infections, extreme performance problems that do not go away, catastrophic updates , or very large hardware changes (especially motherboard) that leave the system half crazy.

In these circumstances, commands are still useful for saving data, generating reports, and checking the disk's status before formatting, but you shouldn't be afraid to reinstall: often that's what really restores stability.

Mastering these Windows Terminal, CMD, and PowerShell commands gives you a powerful toolbox for diagnosing, repairing, and optimizing your PC without always relying on graphical assistants . By combining SFC, DISM, and CHKDSK with network utilities, disk management, and minor performance tweaks, you can resolve everything from Wi-Fi outages to serious system corruption. And if you also set up a monthly maintenance routine with scripts, your computer will stay fast, stable, and ready for work or play for much longer without any issues.

CMD command
Related articles:
CMD Command: Tips and Tricks to Get the Most Out of the Windows Terminal