Learn safe Command Prompt commands for checking Windows files, networking, storage, and system information, with guidance on when to use each.
Command Prompt and Windows Terminal can collect useful evidence and run supported repairs. The safest workflow is to understand each command, record its result, and avoid scripts copied from unknown sources—especially commands that delete files, alter partitions, or weaken security.
Safe starting point: Save open work, record the exact symptom, and back up irreplaceable files before resets, partition changes, firmware updates, or hardware repairs.
Check system files
Run sfc /scannow in an administrator terminal to verify protected Windows files. If SFC cannot repair them, run DISM /Online /Cleanup-Image /RestoreHealth, then run SFC again.
Review network configuration
Use ipconfig /all to view adapters, addresses, gateways, and DNS servers. Use ipconfig /flushdns only when testing a suspected local DNS-cache issue; it does not repair an internet outage.
Test name resolution and reachability
Use nslookup example.com to query DNS and ping for a basic reachability test. Some servers block ping, so a timeout alone does not prove the site is offline.
Inspect running processes and drivers
Use tasklist to list processes and driverquery for installed driver information. Do not terminate an unfamiliar process until you identify its publisher and purpose.
Check a volume safely
Run chkdsk C: /scan for an online check. Repair switches may schedule work at restart and can stress a failing drive, so back up important data before repair operations.
Save output for comparison
Append > report.txt to save ordinary output to a file you control. Do not share reports publicly without reviewing them for usernames, network addresses, and device details.
Avoid misleading repair shortcuts: Do not use random DLL sites, unsolicited support numbers, unknown command scripts, or generic driver portals. Prefer Windows and the hardware or software publisher.
Frequently asked questions
Should I run CMD as administrator?
Only when the command requires elevation. Use a standard terminal for read-only checks when possible.
Are online repair scripts safe?
Not automatically. Read every command and avoid scripts that disable security, delete broad folders, or change boot records without a clear need.
What order should I run DISM and SFC?
When the component store may be damaged, run DISM first and SFC afterward.
This article provides general educational information. Menus and options vary by Windows version, computer manufacturer, and configuration.