How I Troubleshoot Windows Using Command Prompt

I can’t recall a single month since I started using Windows when I haven’t encountered an issue. Whenever something goes wrong, I turn to the built-in Windows tool: Command Prompt. It may look daunting at first, but once you get the hang of it, it becomes a powerful ally for resolving issues.

5

Repair Corrupted System Files

When my computer starts crashing, showing the Blue Screen of Death (BSOD), slowing down, or acting up in general, the first thing I do is check if corrupted system files are the cause. Fortunately, Command Prompt makes this process simple. I open the utility and type sfc /scannow, which scans for corrupted or missing files and attempts to fix them automatically.

Once the scan finishes, it generates a report detailing any issues it found with the system files and whether it successfully repaired them. If the issue persists, I turn to the DISM tool to repair the Windows image. I enter DISM /Online /Cleanup-Image /RestoreHealth, allow it to complete, and then run sfc /scannow once more, which resolves the issue.

The above commands typically help me resolve most system issues and are the ones I use most often in the Command Prompt app.

4

Resolve Network Connectivity Issues

We’ve all experienced it—right when you’re trying to finish an urgent task or hit a deadline, the internet starts acting up. Maybe the Wi-Fi keeps disconnecting, the connection is painfully slow, or it drops out entirely. I run into this problem from time to time, and before pointing fingers at my ISP, I like to run a few Command Prompt checks to make sure the issue isn’t on my end.

Here are the commands I typically use and what they do:

  • ipconfig /release and ipconfig /renew: These release the current IP address and request a new one from the router.
  • ipconfig /flushdns: This clears out old or corrupted DNS entries, allowing my system to fetch fresh DNS records.
  • netsh int ip reset: This resets the TCP/IP stack to its default state. I only use this command as a last resort when other steps don’t work.

These are just the basic commands I rely on, and they usually solve most connectivity issues. However, you can also use advanced commands for deeper network troubleshooting.

Related

Internet Connection Not Working? 10 Troubleshooting Tips

Internet suddenly not working?

3

Scan and Diagnose Hard Drive Errors

Windows offers a built-in utility called Check Disk, which has been part of my regular system maintenance for years. This tool scans your drive’s file system and physical sectors to detect and fix issues like corrupted files, bad sectors, lost clusters, and directory errors. Left unchecked, these issues can cause file corruption, system freezes, and more.

To run it, open Command Prompt and type chkdsk C: /f /r. Here, C: is the drive you want to scan, /f tells the tool to fix any detected errors, and /r instructs it to locate bad sectors and recover readable data.

If hard drive errors happen often, I also use the wmic diskdrive get status command to check the drive’s health. If the output shows “OK,” the drive is healthy. But if it says “Pred Fail” or “Unknown,” it’s a warning that the drive could be failing, so when I notice that, I back up my important data.

2

Force Quit Unresponsive Apps

When an app or task becomes unresponsive, we turn to Task Manager to force it to close. But what if Task Manager fails to do the job? In that case, I use the taskkill command in Command Prompt, which forcefully ends stubborn processes. You can shut down a process using its name or Process ID (PID), but using the name is simpler since it doesn’t require looking up the PID.

To terminate a specific app or process, open Command Prompt and type taskkill /IM processname.exe /F. Replace “processname” with the actual name of the process. For example, to close Notepad, you’d use: taskkill /IM notepad.exe /F. Here, /IM stands for Image Name, and /F forces the termination of the process.

You can also close multiple processes at once by separating them with additional /IM flags, like this: taskkill /IM app1.exe /IM app2.exe /F. Just add the appropriate process names.

1

Troubleshoot Microsoft Store & App Glitches

I often use apps from the Microsoft Store, but sometimes they act up. They refuse to open, fail to update, or cause the Store itself to crash or slow down. So, whenever the Microsoft Store acts up, I clear its cache, which usually resolves the issue.

To do this, open Command Prompt and type wsreset.exe. This opens a blank Command Prompt window for a few seconds, and then the Microsoft Store launches automatically.

If that doesn’t work, you can re-register the Microsoft Store apps for all users to help resolve persistent issues.

Related

Microsoft Store Not Opening on Windows 11? 8 Ways to Fix It

Start installing apps from the Microsoft Store!


The Command Prompt isn’t some outdated relic; I still use it regularly to troubleshoot Windows problems. Now you know how you can tackle Windows issues without relying on any flashy interface. So, the next time you run into any of the problems mentioned above, give this simple black window a try — chances are, it’ll get the job done.


Source link
Exit mobile version