30 Windows Commands You Can’t Live Without: The Working Set, Organised by Job

Our earlier Windows episode covered seven commands in depth: the network five and the SFC and DISM repair pair, worked as a layered diagnosis. This second episode goes wider. Thirty commands, organised not alphabetically but by the job you are actually doing when you reach for them — finding a network fault, learning what machine you are standing in front of, taming a stuck process, moving files safely, and repairing or updating the system itself. Every command and switch below is taken from Microsoft Learn's Windows Commands reference. The workflow angle matters more than the list: run the command, save its output, and let one result choose the next command.

Job one: find the network fault (commands 1–8)

1. ipconfig shows the TCP/IP configuration of every adapter. ipconfig /all adds DNS servers, DHCP state, and physical addresses; /flushdns clears the resolver cache, and /release followed by /renew drops and re-requests a DHCP lease. Start here, because half of all "network faults" are a machine holding the wrong address, gateway, or DNS server.

2. ping sends ICMP echo requests and reports replies and round-trip times. Ping the gateway, then an outside address by number, then the same address by name. Three short tests split the fault into local network, internet path, or name resolution — before you change anything.

3. tracert traces the route hop by hop and times each step, showing where a path slows or stops. tracert -d skips resolving hop addresses to names, which makes it faster and cleaner to read.

4. pathping combines the route discovery of tracert with statistics gathered at each hop over time. It is slower, because it is measuring, not just mapping. Reach for it when a connection is intermittently bad: it shows which hop is losing packets, not merely that loss exists.

5. nslookup queries DNS directly, outside the normal resolver path. Ask it for a name, or point it at a specific server — nslookup example.com 1.1.1.1 in form — and you can tell whether the record is wrong or your usual server is wrong. When a site fails by name but answers by address, this is the command that proves it.

6. netstat lists active connections and listening ports. netstat -ano adds the owning process ID for each entry, which turns a suspicious connection into a named program once you match the ID against tasklist. For a security check, unexplained listening ports are the finding.

7. arp displays the address resolution cache: the IPv4-to-physical-address mappings this machine has learned on its local network. arp -a is the quick view. A gateway address mapped to an unexpected physical address is worth investigating before you trust the network.

8. route displays the routing table with route print, showing which interface and gateway Windows will use for each destination. On a machine with Wi-Fi, Ethernet, and a VPN all connected, this answers the otherwise invisible question: where will this traffic actually go?

Job two: learn the machine in front of you (commands 9–14)

9. hostname prints the computer's name — trivial, until you are remoting into three machines at once and need certainty about which one is about to receive the next command.

10. systeminfo reports the operating system version and build, install date, boot time, processor, memory, network adapters, and installed hotfixes. It is the first page of any support ticket.

11. whoami reports the account the current session is running as, and whoami /groups lists the group memberships and privileges in that token. When a command fails with access denied, this tells you whether you are who you thought you were — and whether the prompt is elevated.

12. getmac lists the physical address and transport name of each network adapter, with /v for the fuller view. It is the fastest way to collect the address you need for a DHCP reservation or an allowlist, without opening three settings screens.

13. driverquery lists installed device drivers and their properties; /v adds detail including link dates. When hardware misbehaves after an update, a saved driver list from a healthy day turns guesswork into a comparison.

14. gpresult reports the Group Policy settings actually applied to a user or computer; /r gives the summary view. On a managed machine, it explains settings nobody remembers setting.

Job three: tame processes and services (commands 15–18)

15. tasklist lists running processes with their process IDs and memory use. tasklist /svc shows the services hosted inside each process, which is how you find what a generic service host is really doing. Filters narrow it: tasklist /fi with a filter expression selects by name, status, or memory threshold.

16. taskkill ends a process by ID with /pid, or by image name with /im; /f forces termination and /t also ends child processes. Use it in that order — identify with tasklist first, close normally if you can, force only when the process will not answer. Forcing a process that is writing data can cost the data.

17. sc communicates with the Service Control Manager. sc query reports a service's state, sc qc shows its configuration, and sc config changes settings such as the start type. It is the scriptable half of the Services console.

18. schtasks creates, queries, changes, runs, and deletes scheduled tasks. schtasks /query inventories what runs automatically on a machine — a legitimate maintenance check and a security check in one, because persistence loves a schedule nobody reviews.

Job four: move files, map drives, and work the output (commands 19–24)

19. dir lists a folder's contents, and its switches make it a reporting tool: /s recurses through subfolders, /b gives bare names for clean lists, and /o sorts the result. dir /s /b saved to a file is an inventory you can diff next month.

20. robocopy is the serious copy tool: it copies folder trees, can mirror them with /mir, resumes interrupted transfers with /z, uses multiple threads with /mt, and writes a real log with /log. It is the backup and migration command in this set. Respect /mir: it deletes at the destination what is gone at the source, so test without it first.

21. net use connects to shared resources and maps drive letters to network shares, and with no arguments lists the connections already made. It is how a script makes a server's folder appear as a local drive — and how you audit open shares.

22. net user lists local accounts, and with a name shows that account's details, including password age and group membership. On a shared or family machine it is the plain-language audit: which accounts exist, and does everyone recognise all of them?

23. findstr searches text files for strings and patterns. Point it at logs — findstr /i "error" app.log in form, with /i for case-insensitive matching — and a ten-thousand-line log becomes the twenty lines that matter. It pairs naturally with redirection, below.

24. clip redirects a command's output straight to the Windows clipboard. ipconfig /all | clip puts the full configuration into your next email or ticket without selecting a screen of text by hand. Small command, daily time saved.

Job five: repair it, power it, update it (commands 25–30)

25. sfc — System File Checker — scans protected system files. sfc /scannow repairs what it finds; sfc /verifyonly reports without changing anything, which is the right first move on a machine you are still diagnosing.

26. dism services the Windows image and its component store. DISM /Online /Cleanup-Image /RestoreHealth repairs the store that SFC restores files from — which is why, as our earlier episode explained, DISM runs first when SFC reports files it could not fix.

27. chkdsk checks a disk's file system and, with /f, fixes errors it finds; /r also locates bad sectors and recovers readable information, at the cost of a long run. Schedule it, let it finish, and treat repeated disk errors as a hardware warning, not a software nuisance.

28. powercfg controls and reports power settings. powercfg /batteryreport writes a detailed battery history report on a laptop, and powercfg /energy observes the system for a period and reports behaviours wasting power. Sleep and battery mysteries usually stop being mysteries after these two reports.

29. winget is the Windows Package Manager client: winget install, upgrade, and search install and update applications from the command line, and winget upgrade --all brings everything it manages up to date in one pass. It turns the weekly update chore into one command you can script.

30. shutdown shuts down or restarts the machine, with /r for restart, /s for shutdown, /t to set a delay, and /a to abort a pending shutdown. After a repair pass or an update, shutdown /r /t 0 is the clean finish — and /a is the save when you fired it in the wrong window.

The workflow that ties the thirty together

A list is trivia; a workflow is a skill. Three habits make these commands compound. First, save your output. Appending > report.txt to a command redirects its output to a file — systeminfo > report.txt and driverquery /v > drivers.txt give you a dated record of a healthy machine, and every later diagnosis becomes a comparison instead of a memory test. Second, chain by question. Each command answers one question and chooses the next: ipconfig asks what the machine thinks its network is, ping asks what it can reach, netstat plus tasklist ask which program owns a connection, and sc or taskkill act on the answer. Third, check before you change. The read-only forms — sfc /verifyonly, chkdsk without /f, robocopy without /mir, schtasks /query — exist so the first pass costs nothing. Diagnose read-only, repair deliberately, and keep the log.

The honest limits

These are Windows' built-in tools, with built-in limits. Several repairs need an administrator prompt, and a standard account will simply be refused. ping and tracert depend on networks answering ICMP, which many hosts and firewalls deliberately ignore — silence is not proof of failure. robocopy /mir and taskkill /f are destructive when aimed carelessly, and chkdsk findings on an ageing drive are a reason to back up first, not to keep repairing. None of these commands removes malware; a machine you believe is compromised needs a security response, with these tools in a supporting role.

The bottom line

Thirty commands, five jobs. Network: ipconfig, ping, tracert, pathping, nslookup, netstat, arp, and route. The machine itself: hostname, systeminfo, whoami, getmac, driverquery, and gpresult. Processes and services: tasklist, taskkill, sc, and schtasks. Files and workflow: dir, robocopy, net use, net user, findstr, and clip. Repair and upkeep: sfc, DISM, chkdsk, powercfg, winget, and shutdown. Learn them by job, save their output, and let each answer choose the next command — that is the difference between knowing commands and working with them.

By Karl Amber

Sources

  • Microsoft Learn — Windows Commands reference (A–Z): individual references for ipconfig, ping, tracert, pathping, nslookup, netstat, arp, route, hostname, systeminfo, whoami, getmac, driverquery, gpresult, tasklist, taskkill, sc, schtasks, dir, robocopy, net use, net user, findstr, clip, sfc, DISM, chkdsk, powercfg, and shutdown, including each command's documented switches and behaviour.
  • Microsoft Learn — Winget documentation (Windows Package Manager): winget search, install, and upgrade, including upgrade –all.
  • Microsoft Learn / Microsoft Support — System File Checker and DISM documentation: sfc /scannow and /verifyonly; DISM /Online /Cleanup-Image /RestoreHealth repairing the component store, and the documented DISM-then-SFC sequence when SFC cannot repair files.
  • Microsoft Learn — Using command redirection operators: redirecting command output to a file with > and piping output between commands, the basis of the workflow section.

Editor's note: this article is part of ScanderLoud's Cybersecurity & Networking series. It is the second Windows-commands episode; the first (harvest #22) covered seven commands in depth. This episode was researched from Microsoft Learn's command references only — our coverage is original, with our own organisation and examples. No NetworkChuck video was opened or used.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *