Windows

Windows Troubleshooting

Essential Windows troubleshooting commands for diagnosing and fixing system issues, repairing boot records, checking disk errors, and restoring system health.

40 commands
Windows
#windows #troubleshooting #repair #diagnostics #sfc #dism #chkdsk

System File Repair

Scan and repair corrupted system files
sfc /scannow
Quick health check of system image
DISM /Online /Cleanup-Image /CheckHealth
Detailed scan of system image
DISM /Online /Cleanup-Image /ScanHealth
Scan and repair corrupted system image files
DISM /Online /Cleanup-Image /RestoreHealth

Boot & Recovery

Fix Windows Master Boot Record
bootrec /fixmbr
Write new boot sector to system partition
bootrec /fixboot
Rebuild Boot Configuration Data
bootrec /rebuildbcd
List all boot configuration entries
bcdedit /enum
Scan for Windows installations not in BCD
bootrec /scanos

Disk & Storage

Check and fix disk errors on C:
chkdsk C: /f
Check disk and recover readable data
chkdsk C: /r
Configure Disk Cleanup settings
cleanmgr /sageset:1
Run Disk Cleanup with saved settings
cleanmgr /sagerun:1
Optimize drive (defrag HDD or TRIM SSD)
defrag C: /O

Network Troubleshooting

Clear DNS Resolver Cache
ipconfig /flushdns
Release current DHCP IP address
ipconfig /release
Renew DHCP IP address
ipconfig /renew
Reset Winsock catalog (fixes network stack)
netsh winsock reset
Reset TCP/IP stack
netsh int ip reset

System Diagnostics

Restart the computer immediately
shutdown /r /t 0
Shut down immediately
shutdown /s /t 0
List all running processes
tasklist
Force kill a process by PID
taskkill /PID <pid> /F
Force kill a process by name
taskkill /IM notepad.exe /F
Display detailed system configuration
systeminfo
Open System Information GUI
msinfo32

Group Policy & Drivers

Force Group Policy update
gpupdate /force
Display applied Group Policy settings
gpresult /r
Export Group Policy results to HTML
gpresult /h report.html
List installed drivers with details
driverquery /v
Enable Driver Verifier for all drivers
verifier /standard /all

Event Logs & Performance

Open Event Viewer
eventvwr
Query last 10 System events
wevtutil qe System /c:10 /f:text
Generate system performance report
perfmon /report
Open Reliability Monitor
reliabilitymonitor
Open Resource Monitor
resmon

File & Permission Repair

Reset file permissions recursively
icacls C:\path /reset /T
Mirror directories reliably
robocopy C:\Src D:\Dst /MIR
Remove hidden, system, read-only attributes
attrib -h -s -r filename
Wipe deleted data securely on C:
cipher /w:C:\