1.2 - Windows command-line tools

CompTIA A+ Core 2 objective 1.2 covers the Windows command-line tools every technician needs. For repairs, sfc /scannow scans and fixes protected system files, and when it cannot, DISM /Online /Cleanup-Image /RestoreHealth repairs the underlying Windows image. For networking, ipconfig /all shows the full IP configuration of every adapter, ipconfig /flushdns clears a stale local DNS cache after a DNS change, and ping tests connectivity by sending ICMP echo requests to a host. You should recognise each command by what it does and choose the right one for a described symptom. Expect scenario questions that give a problem - corrupted system files, stale name resolution, no connectivity - and ask which command-line tool resolves it. Knowing the exact command and its purpose matters, because reaching for the wrong tool wastes time on a fault it was never meant to fix.

Memory hook
Repair system files = sfc /scannow; if that fails = DISM RestoreHealth. Full IP config = ipconfig /all; clear DNS cache = ipconfig /flushdns; test reachability = ping (ICMP).

Practice questions

1. Which command maps a network share to a drive letter in Windows?

  • net stop
  • net use (correct answer)
  • netstat
  • nslookup

net use Z: \server\share maps a shared folder to a drive letter. netstat shows connections; net stop stops a service.

2. Which Windows command-line tool scans and repairs protected system files by replacing corrupted ones?

  • chkdsk /f /r
  • sfc /scannow (correct answer)
  • diskpart
  • format c: /q

System File Checker (sfc /scannow) verifies and repairs protected OS files. chkdsk checks disk integrity; diskpart manages partitions; format erases a volume.

3. Which Windows command displays the IP configuration of all adapters?

  • ping (test)
  • ipconfig /all (correct answer)
  • chkdsk (disk)
  • sfc /scannow

ipconfig /all lists IP, mask, gateway, DNS and MAC for each adapter. ping tests connectivity.

4. Which command copies directories with files, subfolders and can resume/mirror large transfers in Windows?

  • The copy command
  • The robocopy command (correct answer)
  • The del command
  • The format command

robocopy (Robust File Copy) copies trees, mirrors, retries and resumes — better than copy/xcopy for large jobs.

5. Which Windows command-line tool creates, deletes and formats partitions?

  • chkdsk
  • diskpart (correct answer)
  • ipconfig
  • tasklist

diskpart manages disks/partitions/volumes from the CLI (list, select, create, format). Use carefully — it can erase data.

6. Which command shows the running processes from the Windows command line?

  • dir /w
  • tasklist (correct answer)
  • cd ..
  • ping -n

tasklist lists running processes; taskkill ends them by name/PID. dir lists files; cd changes directory.

Related objectives