Skip to main content
Study Guide · A+ Core 2 · CompTIA 220-1202 V15

What each objective is asking you to know

Plain-English reference for every CompTIA A+ Core 2 V15 objective. Each entry covers what the exam tests, key facts, and how the concept connects to neighboring objectives. Pair with Quiz and Flashcards to lock it in.

Objective C2-1.5

Objective 1.5: Given a scenario, use the appropriate Microsoft command-line tools

Cert: CompTIA A+ Core 2 (220-1202) V15 Domain: 1.0 Operating Systems Weight: Part of the 28% Operating Systems domain Depth: Given a scenario, use. The candidate must pick the right Windows command for a given diagnostic or admin task.

What this objective tests

You should know what each common Windows command does, what its key flags are, and when to reach for it over a GUI tool. CompTIA tests these as direct fact recall and as scenario-driven "which command does X" questions.

Most of these run in Command Prompt (cmd.exe) or PowerShell. Some need elevated (Administrator) privileges.

Key facts

cd (change directory):

  • Navigate the filesystem in the current shell.
  • cd \ jumps to the drive root. cd .. goes up one folder. cd C:\Users\Name jumps to an absolute path.
  • cd /d D:\folder changes drive AND directory in one step.

dir (directory listing):

  • List files and folders in the current directory.
  • Common flags: /a shows hidden files, /s recurses into subfolders, /o sorts, /p pauses per page, /b bare format (just names).

ipconfig:

  • Show IP configuration for all adapters.
  • ipconfig /all shows MAC addresses, DHCP servers, DNS servers, lease times.
  • ipconfig /release releases the current DHCP lease. ipconfig /renew requests a fresh one.
  • ipconfig /flushdns clears the DNS resolver cache (use when DNS records changed and you're still getting old answers).

ping:

  • Test ICMP reachability to a host by name or IP.
  • ping example.com sends 4 echo requests by default. ping -t example.com pings continuously until Ctrl+C.
  • The DNS vs connectivity discriminator: ping hostname works AND ping IP works = both fine. ping IP works but ping hostname fails = DNS issue. Neither works = network issue.

netstat:

  • Show active TCP/UDP connections and listening ports.
  • netstat -ano shows all connections + listening + with PID. Useful for "what process is using port X."
  • netstat -rn shows the routing table.

nslookup:

  • Query DNS records directly. Tells you which DNS server answered and what record(s) it returned.
  • nslookup example.com returns A/AAAA records. nslookup -type=MX example.com returns mail records.
  • First tool after ping when you suspect DNS is broken.

net use:

  • Map a network drive or connect to a shared resource.
  • net use Z: \\server\share maps Z: to the share. net use Z: /delete unmaps it.
  • net use with no args lists current mappings.

tracert (traceroute):

  • Show the network path to a destination, hop by hop, with latency per hop.
  • Use when you can reach a destination but it's slow, or when you can't reach it and need to find where the path breaks.

pathping:

  • Combines tracert and ping. Sends multiple packets to each hop and reports loss/latency stats over time.
  • Slower than tracert (takes a few minutes) but better data for diagnosing intermittent path issues.

chkdsk:

  • Check Disk. Scan a drive for filesystem errors and bad sectors.
  • chkdsk C: /f fixes errors (requires reboot for the system drive). chkdsk C: /r adds bad sector recovery (long run, hours on a large drive).
  • Use when filesystem appears corrupt or the OS reports disk errors.

format:

  • Format a drive with a filesystem.
  • format D: /fs:ntfs formats D: as NTFS. /q is quick format (just rewrites the filesystem header, doesn't check sectors).
  • Destructive. The data is gone.

diskpart:

  • Interactive partition management. Create, delete, format, assign letters, set active partitions.
  • More powerful and more dangerous than Disk Management GUI. Wrong drive selection wipes the wrong disk.
  • Standard tool for prepping drives during OS install or disk recovery.

md (mkdir):

  • Create a directory. md NewFolder or mkdir NewFolder.
  • md C:\Path\To\New\Folder creates intermediate directories as needed.

rmdir (rd):

  • Remove a directory. rmdir EmptyFolder removes an empty folder. rmdir /s FolderWithStuff removes recursively (destructive).
  • /q runs quietly without prompts.

robocopy:

  • Robust file copy. Better than xcopy and the Explorer copy dialog for large or unreliable copies.
  • Resumes interrupted copies, preserves attributes and permissions, throttles bandwidth, mirrors directories.
  • Common flags: /MIR mirrors source to destination (destructive on destination), /E copies all subdirectories including empty, /R:n retry count, /W:n wait between retries.
  • Standard tool for file server migrations and large user-data moves.

hostname:

  • Print the current computer's hostname.

net user:

  • Manage local user accounts from the command line.
  • net user lists local users. net user JohnDoe newpassword resets JohnDoe's password (requires admin).
  • net user JohnDoe /add creates a new local user.

winver:

  • Open the About Windows dialog. Shows Windows edition, version, build number.
  • Quick way to know exactly what version you're on without digging through Settings.

whoami:

  • Print the current user. whoami /groups shows group memberships. whoami /priv shows privileges.
  • Useful in scripts and when troubleshooting permission issues.

[command name] /?:

  • Universal help flag. Every Windows command supports /? to show usage.
  • Memorize this: it's the single most-useful CompTIA-exam answer when you don't remember the exact flag.

gpupdate:

  • Force a Group Policy refresh on the local machine.
  • gpupdate /force reapplies all policies even if no changes are detected.
  • Use after editing Group Policy and you want changes immediately instead of waiting for the next refresh cycle (90 minutes default).

gpresult:

  • Show what Group Policy settings are currently applied.
  • gpresult /r shows a summary. gpresult /h report.html outputs a detailed HTML report.
  • Use to diagnose "why isn't this policy taking effect on this PC."

sfc (System File Checker):

  • Verify and repair Windows system files.
  • sfc /scannow scans all protected system files and repairs any that are corrupt (replaces from the local cache).
  • Run when you suspect system file corruption (BSODs, weird OS behavior).
  • Often paired with DISM (DISM /Online /Cleanup-Image /RestoreHealth) to repair the system file cache itself before running sfc.

Common gotchas

  • Running ipconfig /release without /renew. PC drops its IP and doesn't get a new one until you /renew or until Windows reaches back to DHCP on its own.
  • ping -t left running. Continuous ping racks up output and uses some bandwidth. Ctrl+C to stop.
  • chkdsk /f on the system drive. Requires reboot because it needs exclusive access. Windows queues it for next boot. Plan for 15-60 minutes of downtime.
  • format /q on a "failing" drive. Quick format doesn't check sectors. If you suspect bad sectors, use full format (no /q).
  • diskpart wrong-disk wipe. list disk then select disk N carefully. Wrong N = wrong drive deleted.
  • robocopy /MIR pointing the wrong way. Mirror mode deletes anything in the destination that's not in the source. Mirroring an empty folder onto a populated one wipes the populated one.
  • gpupdate doesn't fix all settings. Some Group Policy changes (like installed software, security templates) require restart or logoff to take effect. /force doesn't make those refresh either.
  • sfc reports "Windows Resource Protection could not perform the requested operation." Usually means the component store is corrupt. Run DISM RestoreHealth first, then sfc again.

Real-world context

Daily helpdesk command-line moves:

  • "Internet seems down." ipconfig to see if you have a valid IP. ping 8.8.8.8 to test external connectivity. ping default-gateway to test local. nslookup example.com to test DNS.
  • "Site is slow but not down." pathping site.com to find the slow hop.
  • "Network drive disconnected." net use Z: \\server\share /persistent:yes to re-map.
  • "Mass file move during a server migration." robocopy \\old\share \\new\share /E /Z /COPYALL /R:3 /W:5 /LOG:robo.log.
  • "Suspect system file corruption." DISM RestoreHealth, then sfc /scannow.
  • "Group Policy isn't applying." gpresult /h to see what's actually in effect. gpupdate /force to refresh.

Pro tip: most of these run faster as scripts than as ad-hoc typed commands. Save common workflows as .bat or .ps1 for reuse.

Sources

  • [CompTIA A+ 220-1202 Exam Objectives Version 4.0, Section 1.5](../../../../../../30-RevyTechJourney/CompTIA%20A%2B%20220-1202%20Exam%20Objectives%20%284.0%29.pdf)
  • [Microsoft Learn: Windows commands](https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/windows-commands)
  • [Microsoft Learn: robocopy](https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/robocopy)
  • [Microsoft Learn: chkdsk](https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/chkdsk)
  • [Microsoft Learn: sfc](https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/sfc)
  • [Microsoft Learn: diskpart](https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/diskpart)