Introduction
Windows 11 is faster, smoother, and smarter—but even the best operating systems sometimes run into problems. You might notice slow performance, system crashes, or strange update errors.
The good news? You don’t always need a technician. With the right Command Prompt (CMD) commands, you can fix many Windows 11 problems yourself!
In this complete tutorial, you’ll learn:
✅ The best CMD commands to fix Windows 11 issues
✅ What each command does (in simple language)
✅ How to run them safely
✅ Step-by-step examples with screenshots
What Is Command Prompt (CMD)?
CMD (Command Prompt) is a built-in Windows tool that allows you to run commands to troubleshoot, repair, or configure your computer.
Think of CMD as a direct line to your system—it can perform deep fixes that normal settings can’t.
How to Open Command Prompt in Windows 11
Before using any commands, open CMD with administrator rights.
Steps:
- Press Windows + S and type cmd
- Right-click Command Prompt → Run as administrator
- A black window opens—this is where you’ll type the commands.
1. System File Checker (SFC) – Fix Corrupted System Files
Command:
sfc /scannow
What It Does:
SFC (System File Checker) scans all protected system files and replaces corrupted ones with a clean copy from Windows cache.
When to Use It:
- The system feels slow or crashes randomly
- Windows features are not working properly
- After malware removal
How to Run It:
- Open CMD as administrator.
- Type: sfc/scannow
- Hit Enter and wait for 10–15 minutes
- Restart your PC once done

2. DISM – Repair Windows Image
Command:
DISM /Online /Cleanup-Image /RestoreHealth
What It Does:
DISM (Deployment Image Servicing and Management) checks and repairs the Windows image—basically, the master copy Windows uses to rebuild files.
When to Use It:
- SFC can’t fix errors
- Windows update issues
- Blue screen after updates
How to Run It:
- Open CMD (Admin)
- Type: DISM /Online /Cleanup-Image /RestoreHealth
- Wait 10–20 minutes for the repair to complete
- Restart your PC

Pro Tip: Rerun SFC after DISM to double-check everything is fixed.
3. CHKDSK – Check and Repair Disk Errors
Command:
chkdsk C: /f /r
What It Does:
CHKDSK (Check Disk) finds and fixes hard drive errors that cause freezing, slow performance, or file corruption.
When to Use It:
- PC runs slowly or freezes
- Blue Screen of Death (BSOD)
- Files not opening correctly
How to Run It:
- Open CMD as administrator.
- Type: chkdsk C: /f /r
- Press Y when asked to schedule at the next restart
- Restart your PC
4. IPCONFIG—Fix Internet & Network Issues
Commands:
ipconfig /release
ipconfig /flushdns
ipconfig /renew
What It Does:
These commands reset your IP address and clear the DNS cache, which often fixes internet connectivity or DNS issues.
When to Use It:
- No internet connection
- DNS errors like “Server not found.”
- Wi-Fi connected, but no internet
How to Run It:
- Open CMD (Admin)
- Type these commands one by one:
- ipconfig /release
- ipconfig /flushdns
- ipconfig /renew
- Reconnect to your Wi-Fi
5. NETSH – Reset Network Settings
Command:
netsh winsock reset
What It Does:
Resets Winsock, which manages network requests. Helps fix broken internet connections or slow browsing.
When to Use It:
- The internet is not working after the update
- “No internet secured” error
- Slow or limited connection
How to Run It:
- CMD as Administrator
- Type: netsh winsock reset
- Restart your computer
6. POWERCFG – Fix Battery or Sleep Issues
Command:
powercfg /energy
What It Does:
Analyzes your computer’s power efficiency and lists issues like devices preventing sleep or draining battery.
When to Use It:
- The laptop battery is draining fast
- PC won’t go to sleep
- Random wake-up from sleep
How to Run It:
- CMD (Admin)
- Type: powercfg /energy
- Wait for 60 seconds
- The report is saved as energy-report.html (open it in a browser).
7. BOOTREC – Fix Boot Problems
Commands:
bootrec /fixmbr
bootrec /fixboot
bootrec /scanos
bootrec /rebuildbcd
What It Does:
BOOTREC fixes startup problems like missing boot files or Windows not starting.
When to Use It:
- Windows doesn’t boot
- “No bootable device” error
- After a failed update
How to Run It:
- Boot using Windows installation media
- Select Repair your computer → Command Prompt
- Type commands one by one.
8. TASKLIST & TASKKILL – Manage Running Processes
Commands:
task list
taskkill /im appname.exe /f
What It Does:
Lists and kills unresponsive programs directly from CMD.
When to Use It:
- App frozen
- Task Manager is not responding
How to Run It:
- CMD (Admin)
- Type: tasklist
- → Note the app name (e.g., chrome.exe)
- Then type: taskkill /im chrome.exe /f
9. CLEANMGR & TEMP Cleanup – Free Up Space
Commands:
cleanmgr
%temp%
What It Does:
Opens Disk Cleanup and temporary file folders to free up disk space and improve performance.
When to Use It:
- PC running slow
- Low disk space warnings
Bonus CMD Tips for Windows 11
🔹 Use systeminfo to view detailed system info
🔹 Try driverquery to list all installed drivers
🔹 Type shutdown /r /t 0 to restart instantly
🔹 Use wmic logicaldisk get name to check all drives
Conclusion
CMD isn’t just a black window—it’s one of the most powerful troubleshooting tools in Windows 11. Whether you’re fixing corrupted files, repairing your disk, or resolving network issues, these commands can help revive your PC.
So next time your system acts up, open CMD and use these best CMD commands for Windows 11 fixes—your PC will thank you.
FAQ
1. What is CMD used for in Windows 11?
CMD (Command Prompt) is used to run powerful commands that fix errors, repair files, reset network settings, and manage the system at a deeper level.
More info:
https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/windows-commands
2. Is it safe to run SFC and DISM commands?
Yes, both commands are official Windows repair tools and completely safe when used correctly.
More info:
https://learn.microsoft.com/en-us/windows/win32/sfc/sfc
3. How long does SFC /scannow take to complete?
Usually 10–15 minutes, but on slow PCs, it may take up to 30 minutes.
4. Why does DISM take so long to run?
DISM checks and repairs the entire Windows image, so it takes 10–20 minutes. Slow HDD drives take longer.
More info:
https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/dism
5. What is the difference between SFC and DISM?
- SFC repairs system files
- DISM repairs the Windows image
For best results, run DISM first, then SFC.
6. Will CHKDSK delete my files?
No, itchkdsk /f /r Does not delete files.
It only repairs bad sectors and file system errors.
More info:
https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/chkdsk
7. Why is my internet still not working after the ipconfig commands?
If ipconfig /flushdns it doesn’t work.
Try resetting Winsock:netsh winsock resetMore info:
https://learn.microsoft.com/en-us/troubleshoot/windows-client/networking/reset-winsock-windows
8. What does the powercfg /energy report show?
It shows:
- Battery health
- Sleep/wake issues
- Devices draining power
9. How do I fix a PC that won’t boot using CMD?
Use BOOTREC commands:
bootrec /fixmbr
bootrec /fixboot
bootrec /scanos
bootrec /rebuildbcd
More info:
https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/bootrec
10. Can I close apps using CMD if Task Manager is frozen?
Yes!
Use:
tasklist
taskkill /im appname.exe /f
This force-closes unresponsive apps.
More info:
https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/taskkill



