With regular updates, Windows 10 and Windows 11 usually run smoothly and is stable. Over time, you may encounter problems such as random crashes, slow performance, apps won’t open, internet connectivity issues, failed updates, or even boot errors. In many cases, these problems are caused by corrupted system files, disk errors, incorrect network settings, or misconfigured Windows components. However, Windows 11 and 10 include several built-in troubleshooting commands that can diagnose and fix these issues without reinstalling the operating system. You can run these commands to:
- Repair corrupted system files
- Fix damaged Windows components (the “Windows image”)
- Check and repair disk errors
- Reset your network stack
- Diagnose power, boot, and policy issues
Let’s take a look at the most important Windows troubleshooting commands, what each one does, when you should use it, and how to run them safely on Windows 10 and Windows 11.
Contents
- 1 Why Windows Troubleshooting Commands Are Important
- 2 How to Run Windows Troubleshooting Commands Safely
- 3 Essential Windows Troubleshooting Commands
- 3.1 SFC /SCANNOW – Scan and Repair Corrupted System Files
- 3.2 DISM /Online /Cleanup-Image /RestoreHealth – Repair Windows Image
- 3.3 CHKDSK /F /R – Fix Disk Errors and Bad Sectors
- 3.4 IPCONFIG Commands – Diagnose and Fix Network Issues
- 3.5 NETSH WINSOCK RESET – Reset Network Configuration
- 3.6 GPUPDATE /FORCE – Refresh Group Policy Settings
- 3.7 SHUTDOWN /R /O – Access Advanced Startup Options
- 4 Additional Advanced Windows Troubleshooting Commands
- 5 Recommended Command Usage Order (Troubleshooting Flow)
- 6 When These Commands Don’t Fix the Problem
- 7 How to Prevent Windows Issues in the Future
- 8 Frequently Asked Questions (FAQ)
Why Windows Troubleshooting Commands Are Important
Windows relies on thousands of system files, services, drivers, and background processes to function correctly. If any of these components become corrupted due to power outages, malware, failed updates, or improper shutdowns, you may start experiencing errors or performance issues.
- System file corruption: Core Windows files become damaged or overwritten (often after crashes, sudden shutdowns, malware, or failed updates).
- Windows image damage: The underlying “image” Windows uses to add/remove features and repair itself becomes corrupted.
- Disk errors or bad sectors: Your drive may develop logical errors or physical bad sectors that break files or make Windows unstable.
- Networking stack issues: Misconfigured network settings, corrupted DNS cache, or broken Winsock entries can cause no internet, limited connectivity, or strange network errors.
Windows troubleshooting commands allow you to:
- Scan and repair corrupted system files
- Fix disk and file system errors
- Reset broken network configurations
- Refresh system policies and settings
- Access advanced recovery options

In many situations, running the right command can save you from a full Windows reset or clean installation.
How to Run Windows Troubleshooting Commands Safely
Before running any troubleshooting command, keep these best practices in mind:
- Always run Command Prompt as Administrator
- Click Start → type
cmd - Right‑click Command Prompt → Run as administrator
- Click Yes if prompted by UAC
- Click Start → type

- Save your work and close running applications
- Some commands may require a system restart
- Disk and system repair commands can take several minutes to complete
These commands are safe when used correctly, but they do make system-level changes, so it’s best not to interrupt them once they start.
Essential Windows Troubleshooting Commands
The following commands fix the most common Windows 10 and 11 problems. If your system is unstable, slow, or behaving oddly, start here before moving on to advanced recovery options.
SFC /SCANNOW – Scan and Repair Corrupted System Files
The System File Checker (SFC) scans protected Windows system files and replaces corrupted, missing, or changed files with the correct versions.
What this command does
- Scans all protected system files
- Repairs corrupted or modified files using a cached copy
- Helps fix weird behavior caused by broken Windows components
When you should use it
Run sfc /scannow When you notice:
- Random app or system crashes
- Features not working properly (Start menu, search, Settings, etc.)
- After removing malware
- After a power loss or improper shutdown
How to run the command
- Open Command Prompt as Administrator.
- Type:
sfc /scannow - Press Enter and wait for the scan to reach 100%.

What happens after running it
Once the scanning is complete, SFC will display one of several messages, such as:
- “Windows Resource Protection found corrupt files and successfully repaired them.” → Good news; it fixed issues.
- “Windows Resource Protection found corrupt files but was unable to fix some of them.” → Some corruption remains; run DISM first, then SFC again.
- “Windows Resource Protection did not find any integrity violations.” → System files look fine; your problem may be elsewhere.
You usually don’t need to restart, but if SFC fixes files that were in use, a restart may be suggested.
DISM /Online /Cleanup-Image /RestoreHealth – Repair Windows Image
The DISM (Deployment Image Servicing and Management) repairs the underlying Windows system image that SFC relies on to repair files.
What DISM does
- Checks the health of the Windows image
- Downloads and replaces corrupted components from Windows Update (or local sources)
- Fixes deeper issues that cause SFC to fail
Why it should be run before SFC (in many cases)
If the Windows image is damaged, SFC may not have a clean source to repair from. Running DISM /RestoreHealth first ensures SFC has known‑good components to work with.
When to use it
- SFC reports it cannot repair some files
- Windows updates fail frequently
- You get recurring system errors or crashes
- You’ve tried simpler fixes, and issues keep coming back
How to run the command
- Open Command Prompt as Administrator.
- Type:
DISM /Online /Cleanup-Image /RestoreHealth - Press Enter.

DISM checks Windows component health and downloads replacement files if needed.
What to expect after completion
- Progress may appear to pause at certain percentages – this is normal.
- It can take 10–30 minutes, depending on the level of corruption in your system.
- At the end, DISM will say whether corruption was found and fixed.
After DISM completes successfully, it’s a good idea to run:sfc /scannow again to clean up any remaining system file issues.
CHKDSK /F /R – Fix Disk Errors and Bad Sectors
CHKDSK scans your hard drive for file system errors and physical disk issues.
Command switches explained
chkdsk /f: Fixes logical file system errors (corrupted file entries, lost clusters, directory problems, etc.).chkdsk /r: Locates bad sectors on the disk and attempts to recover readable data. This implies /f, so it also fixes file system errors.
Because /r does a deeper scan, it takes longer but is more thorough.
When you should use it
Consider running CHKDSK if:
- Your PC is unusually slow, especially when opening files or folders
- You hear clicks or strange sounds from a hard drive (on HDDs)
- Windows reports drive errors or asks to “scan and fix” a drive
- You frequently see “file or directory is corrupted and unreadable” errors
How to run it on the system drive
- Open Command Prompt as Administrator.
- Type:
chkdsk C: /f /r - Press Enter.
If you try to check the system drive (usually C:), CHKDSK can’t lock it while Windows is running. You’ll see a prompt like:
“CHKDSK cannot run because the volume is in use by another process. Would you like to schedule this volume to be checked the next time the system restarts? (Y/N)”
Type Y and press Enter, then restart your PC. CHKDSK will run before Windows boots. It may take a while; let it finish.

Windows repairs disk errors during boot, which may take some time depending on drive size.
Note: On SSDs, /r still works but is more about logical errors than traditional “bad sectors” – it’s safe, but expect less obvious benefit than on old HDDs.
IPCONFIG Commands – Diagnose and Fix Network Issues
The IPCONFIG family of commands helps you diagnose and fix many common Internet and network problems.
Useful IPCONFIG commands
ipconfig– Displays basic network info, which includes IP address, Subnet mask, and Default gateway. Use it to confirm that your PC actually has an IP address from your router.ipconfig /all– Shows detailed network configuration: All network adapters (Wi‑Fi, Ethernet, virtual adapters), DHCP status, DNS servers, and Physical (MAC) addresses. Helpful when troubleshooting complex or managed networks.ipconfig /flushdns– Clears the DNS resolver cache. You’ll see a confirmation that the DNS cache was successfully flushed. It’s useful when some websites won’t load but others work fine, or when you suspect DNS errors.ipconfig /release– Releases your current IP address from the DHCP server. Use this when you suspect an IP conflict or when your PC isn’t getting a valid IP address. After running this command, you’ll temporarily lose network connectivity.ipconfig /renew– Requests a new IP address from the DHCP server. Run this command after/releas

Running ipconfig /release then /renew fixes
- “No internet” with a strange or automatic private IP (like 169.254.x.x)
- Network connectivity issues after switching routers or networks
Common network problems solved with IPCONFIG
- No internet after changing routers or ISPs
- Websites not loading while others do
- “Unidentified network” type errors
- IP address conflicts on small networks
- DNS-related browsing issues
NETSH WINSOCK RESET – Reset Network Configuration
Winsock (Windows Sockets) defines how Windows network software accesses network services. If Winsock gets corrupted or misconfigured, you may experience persistent network problems that don’t respond to normal fixes.
What Winsock is
It’s a programming interface and supporting files that handle TCP/IP communications. Many apps rely on it for internet access.
When to use this command
Use netsh winsock reset when:
- You’ve tried IPCONFIG commands, but internet issues persist
- Certain apps can’t access the internet, although the browser can (or vice versa)
- Network issues after VPN or malware removal
Command
netsh winsock reset
Restart requirement
After running it, restart your computer. The reset won’t fully apply until after a reboot.
GPUPDATE /FORCE – Refresh Group Policy Settings
On managed PCs (work or school devices), settings are often controlled by Group Policy. Sometimes, those settings don’t apply immediately.
When policies don’t apply
You might notice:
- Restrictions or settings that should apply but don’t
- Network drive mappings are missing
- Security policies are not updating
In those cases, you can force a policy update.
Command:
gpupdate /force
Forces Windows to reapply Group Policy settings immediately.
Useful for managed/work PCs
- Ensures you have the latest policies from your organization
- Can help resolve odd behavior caused by partially applied policies
Note: On home editions of Windows, this is usually less relevant, as full Group Policy editing is limited.
SHUTDOWN /R /O – Access Advanced Startup Options
Sometimes you need to access Advanced Startup Options/ Windows Recovery Environment (WinRE) for deeper troubleshooting.
What Advanced Startup is
It’s a special boot environment that gives you access to tools like:
- Safe Mode
- Startup Repair
- System Restore
- Command Prompt outside normal Windows
- UEFI/BIOS settings

Why this command is useful
Instead of navigating several menus in Settings, you can jump directly into Advanced Startup with one command.
Command:
shutdown /r /o /f /t 0
/r– restart the computer/o– go to the advanced boot options menu/f– force running applications to close/t 0– restart immediately (0‑second delay)
After running this, your PC will restart and show the Advanced Startup menu, where you can choose Troubleshoot → Advanced options to access Safe Mode, Startup Repair, UEFI firmware, and more.
Additional Advanced Windows Troubleshooting Commands
These commands are designed for specific or advanced scenarios. Use them carefully, but they can be extremely effective when standard fixes don’t work.
BOOTREC /FIXMBR – Fix Master Boot Record Issues
The Master Boot Record (MBR) helps your PC start Windows (especially on older BIOS/MBR systems). If it becomes corrupted, you may experience serious boot problems.
Repairs the Master Boot Record (MBR), which controls how Windows starts.
When you should use it
You might need bootrec /fixmbr if you see:
- “Operating System not found”
- “Error loading operating system”
- Boot looping before Windows logo appears
- Boot issues after removing another OS (like Linux) from a dual‑boot setup
This command must be run from Advanced Startup
You cannot usually run BOOTREC commands from normal Windows. Instead:
- Boot into Advanced Startup:
- Use
shutdown /r /o(if you can still boot), or - Boot from a Windows installation USB and choose Repair your computer.
- Use
- Go to Troubleshoot → Advanced options → Command Prompt.
- In Command Prompt, run:
bootrec /fixmbr

Warning note
- On systems using UEFI with GPT, boot repair steps may be different.
- Entering the wrong commands in this environment can make boot issues worse, so if you’re unsure, consider backing up data first or getting professional help.
SYSTEMRESET -CLEANPC – Reset Windows Without Removing Personal Files
When your system is badly messed up, and repairs don’t help, a Windows reset can give you a fresh start.
What this command does
systemreset -cleanpc launches the Reset this PC experience, similar to using it from Settings.
When you should use it
- Severe performance problems
- Persistent system corruption
- Malware damage after cleanup
What gets removed
- Installed desktop apps and most programs
- Some drivers and custom configurations
- Many personal customizations
What stays (if you choose “Keep my files” during the reset)
- Personal files in your user folders (Documents, Pictures, Desktop, etc.)
- Microsoft Store apps can usually be reinstalled
When this is better than a clean install
- You want a fresh Windows environment without manually reinstalling from USB
- You don’t want to lose personal files, but you’re okay reinstalling apps
- SFC, DISM, and other troubleshooting commands haven’t fixed the issue
Note: On some systems, systemreset may need to be run from Windows or from recovery, and might not work if the system is heavily damaged.
TASKLIST and TASKKILL – Manage Frozen or Unresponsive Programs
When programs hang and Task Manager won’t open or can’t kill them, these commands can help.
What these commands do
tasklistdisplays running processestaskkillforce-closes unresponsive applications
When you should use them
- Apps freeze and won’t close
- Task Manager isn’t responding
Force‑closing stuck apps with TASKKILL
To close a misbehaving program by name: Find the process using the command: tasklist then Kill process using the command: taskkill /im appname.exe /f
Example:
taskkill /im notepad.exe /f
Or by process ID (PID):
taskkill /pid 1234 /f
(Replace 1234 with the real PID from tasklist.)
POWERCFG /ENERGY – Diagnose Power and Battery Problems
If your laptop battery drains too fast, doesn’t sleep correctly, or your desktop has power‑related issues, powercfg can help diagnose the problem.
What this command does
powercfg /energy analyzes your system’s power efficiency and creates a detailed report.
Command:
powercfg /energy
- The scan usually runs for 60 seconds.
- When finished, it generates an HTML report (typically saved as
energy-report.htmlinC:\Windows\System32).

Laptop battery drain & sleep issues
The report highlights:
- Devices preventing sleep or standby
- Misconfigured power plans
- Drivers that don’t support power management well
How to access the report
- After running the command, note the file path displayed.
- Open File Explorer and navigate to that path.
- Copy the report (for example, to your Desktop) and open it in a web browser.
You’ll see Errors, Warnings, and Informational sections with detailed recommendations.
Recommended Command Usage Order (Troubleshooting Flow)
Here’s a simple flow to use these Windows troubleshooting commands effectively.
1. Windows crashes, blue screens, or OS instability
- Step 1: Run DISM:
DISM /Online /Cleanup-Image /RestoreHealth - Step 2: Then run SFC:
sfc /scannow
2. Slow system, freezing, or suspected drive issues
- Step 1: Run CHKDSK on your system drive:
chkdsk C: /f /r(Schedule and restart when asked.) - Step 2: After CHKDSK, run SFC:
sfc /scannow
3. Internet or network issues
- Step 1: Use IPCONFIG:
- Check details:
ipconfig /all - Refresh IP:
ipconfig /releasethenipconfig /renew - Clear DNS:
ipconfig /flushdns
- Check details:
- Step 2: If issues persist, reset Winsock:
netsh winsock resetThen restart your PC.
4. Boot issues (Windows won’t start properly)
- Step 1: From a working Windows session, run:
shutdown /r /o /f /t 0to access Advanced Startup. If Windows won’t load at all, boot from a Windows USB and select Repair your computer. - Step 2: From Advanced options → Command Prompt, use appropriate boot repair commands like:
bootrec /fixmbr
(Only if you’re certain you’re on an MBR‑based system and understand the implications.)
When These Commands Don’t Fix the Problem
These commands are powerful, but they can’t fix everything. In some situations, you may still have issues even after trying all the usual Windows repair commands.
Common reasons include:
- Hardware failure
- Failing hard drive or SSD
- Bad RAM
- Overheating CPU or GPU
- Severe system corruption
- Critical Windows files or partitions damaged beyond repair
- Malware that deeply modified system components
- Damaged installation or repeated failed upgrades
- Upgrading from very old Windows builds
- Incomplete or interrupted upgrades
In these cases, you may need to:
- Do an in‑place upgrade repair using the Windows ISO
- Perform a Reset this PC (keeping or removing files)
- As a last resort, do a clean install of Windows and restore from backup
How to Prevent Windows Issues in the Future
You can’t avoid every problem, but you can drastically reduce how often you need these troubleshooting commands.
- Keep Windows updated: Install important security and stability updates. They often fix known bugs and vulnerabilities.
- Avoid forced shutdowns: Don’t hold the power button or unplug the PC unless absolutely necessary. Sudden power loss is a major cause of file and disk corruption.
- Use a reliable antivirus: Keep Windows Security (or a trusted third‑party antivirus) active and up to date. Malware is a common source of broken system files and network settings.
- Create restore points: Before major changes (driver installs, big software, registry tweaks), create a System Restore point so you can roll back if something breaks.
- Back up regularly: Use File History, OneDrive, or another backup solution. If a drive fails, backups are your safety net.
Frequently Asked Questions (FAQ)
If your system is generally working but has odd issues, you can start with SFC. If SFC reports that it cannot repair some files, then run DISM and run SFC again.
If you already suspect deeper Windows damage (failed updates, repeated errors), it’s often better to run:DISM /Online /Cleanup-Image /RestoreHealth
Then sfc /scannow
Yes, these commands are built into Windows and are safe when used properly. Most of them only scan or repair system components. Just make sure you run them from an administrator Command Prompt and avoid interrupting the process once it starts.
Yes, all the commands in this guide work on both Windows 10 and Windows 11. Microsoft continues to support these tools across versions because they are essential for diagnosing and fixing system problems.
Most troubleshooting commands do not remove personal files. Commands like SFC, DISM, CHKDSK, and network resets only repair system components. Only reset-related commands may remove installed apps, not personal data.
Yes, most Windows troubleshooting commands require administrator privileges. Without admin access, the commands may fail or provide limited results.
The time varies by command and system speed. Some commands finish in seconds, while disk or system image repairs can take several minutes. It’s normal for progress to appear slow during scans.







