CompTIA A+ guideCore 2 skills

A+ Core 2 Windows Commands: What Each One Does and When to Use It

Objective 1.5 of 220-1202 lists the Windows command-line tools you need. Here is each one mapped to a task, which ones only report and which ones change the system, and the pairs candidates mix up.

Short answer

Objective 1.5 of the 220-1202 objectives lists 23 Windows command-line items: cd, dir, ipconfig, ping, netstat, nslookup, net use, tracert, pathping, chkdsk, format, diskpart, md, rmdir, robocopy, hostname, net user, winver, whoami, the [command name] /? help habit, gpupdate, gpresult, and sfc. For each one, know the task it solves, the common switches, and whether it only reports or changes the system. Questions usually describe a task and ask for the command.

The 1.5 list, organized by task

Objective 1.5 of the 220-1202 objectives, version 3.0, is a "given a scenario" objective. It groups the commands into navigation, network, disk management, file management, informational, and OS management. The table follows those groups. Switches shown are from Microsoft's command reference, checked October 17, 2026, and use the form that reference shows. For example, ping is documented with slashes and netstat with hyphens.

TaskCommandExampleWhat to remember
Change folderscdcd .. or cd /d D:\Logs.. goes up one level. /d also changes the drive.
List folder contentsdirdir /aHidden and system files are left out unless you use /a. /s searches subfolders.
Show IP settingsipconfigipconfig /allPlain ipconfig shows address, mask, and gateway. /all shows the full configuration for every adapter.
Get a new DHCP addressipconfigipconfig /release, then ipconfig /renewOnly works on adapters set to obtain an address automatically.
Clear cached DNS answersipconfigipconfig /flushdnsClears the DNS client resolver cache. /displaydns shows it.
Test reachabilitypingping /n 10 192.0.2.1Sends 4 echo requests by default. /t runs until you stop it.
See the path to a hosttracerttracert /d example.comLists each hop, up to 30 by default. /d skips name lookups.
Find where packets are lostpathpingpathping /n example.comTraces the path, then measures loss at each hop over time.
See connections and listening portsnetstatnetstat -a -n -o-a all connections and listening ports, -n numbers, -o process ID. -b fails without sufficient permissions.
Query DNS directlynslookupnslookup example.com 192.0.2.53The second argument picks the DNS server to ask.
Map or remove a network drivenet usenet use M: \\files01\dept and net use M: /deleteWith no parameters, it lists your connections.
Check and repair a diskchkdskchkdsk C: /fReports only, unless you add /f or /r. Needs administrator rights.
Format a volumeformatformat E: /fs:NTFS /qErases the volume. /q is a quick format.
Manage disks and partitionsdiskpartlist disk, then select disk 1An interactive tool. Commands act on the object with focus.
Make a foldermdmd Reports\2026Same as mkdir. Creates intermediate folders.
Remove a folderrmdirrmdir /s OldFails on a non-empty folder unless you use /s. Same as rd.
Copy folder trees reliablyrobocopyrobocopy C:\Data D:\Backup /e /z/e includes empty subfolders. /z makes copies restartable.
Show the computer namehostnamehostnamePrints the host name only.
List or manage local user accountsnet usernet user or net user jsmithCan add, delete, enable, and disable accounts.
Show the Windows versionwinverwinverOpens a window with the Windows version and build.
Show the signed-in identitywhoamiwhoami /groupsPlain whoami shows domain\user. /all shows SIDs, groups, and privileges.
Read a command's help[command] /?robocopy /?Shows the built-in syntax and switches before you guess.
Apply Group Policy nowgpupdategpupdate /forceBy default, only changed settings apply. /force reapplies everything.
See which policies appliedgpresultgpresult /rNeeds an output option such as /r, /v, /z, or /h report.html.
Repair protected system filessfcsfc /scannowRun from an elevated prompt. /verifyonly scans without repairing.

That is the whole 1.5 list. Some prep lists add commands such as net view, which version 3.0 of the objectives does not name, so treat extras like that as background rather than as the list to learn.

Reports vs repairs: know which commands change the system

Scenario questions often hinge on whether a command is safe to run.

Report only. ipconfig with no switch or with /all, ping, tracert, pathping, netstat, nslookup, hostname, whoami, winver, gpresult, dir, and chkdsk with no switches. Microsoft notes that chkdsk without parameters only shows the volume's status.

Change something. ipconfig /release, /renew, and /flushdns; net use when mapping or deleting; net user when adding, deleting, or disabling; gpupdate; md; chkdsk /f or /r; sfc /scannow.

Can destroy data. format erases a volume. In diskpart, the clean command removes all partition or volume formatting from the disk with focus. rmdir /s /q deletes a whole folder tree with no confirmation. robocopy /mir mirrors the source, which means it deletes destination files that are not in the source.

Need administrator rights. Microsoft's reference says chkdsk, sfc, and diskpart require membership in the Administrators group, and format does for a hard drive.

Pairs that candidates mix up

  • tracert vs pathping. tracert shows the hops. pathping shows the hops, then sends 100 queries to each router by default and reports loss per hop and per link. Pick pathping when the question says "intermittent loss somewhere along the path." Expect it to take a while.
  • chkdsk vs sfc. chkdsk checks the file system on a volume. /r includes /f and adds a search for bad sectors. sfc checks Windows' protected system files. A disk error points to chkdsk. Corrupted Windows files after a crash or a bad update point to sfc. Microsoft's own repair guidance runs DISM /Online /Cleanup-image /Restorehealth before sfc /scannow. DISM is not on the 1.5 list, but it is worth recognizing.
  • gpupdate vs gpresult. One applies policy, the other reports what applied.
  • net use vs net user. One letter apart. net use handles network connections, such as mapped drives. net user handles accounts.
  • format vs diskpart. format works on one volume. diskpart works on disks, partitions, and volumes, and can wipe a whole disk.
  • ipconfig /flushdns vs /release and /renew. A name problem calls for flushing the cache. An address problem calls for release and renew.

One ticket, four commands

A fictional user says, "The M: drive is gone, and websites won't load." A technician at her Windows 11 desk works through it like this:

  1. ipconfig /all shows a 169.254.x.x address. The client got no DHCP reply, so this is an addressing problem first, not a drive problem.
  2. The technician finds a loose patch cable, reseats it, and runs ipconfig /release and ipconfig /renew. The PC now has a valid address, gateway, and DNS server.
  3. nslookup files01 resolves the file server's name, so DNS is working.
  4. net use shows M: as unavailable. net use M: /delete removes the stale entry, and net use M: \\files01\dept maps it again.

The order matters as much as the commands. Mapping the drive again in step 1 would have failed, because the PC had no working address. The A+ networking guide explains the 169.254 clue, and the ports guide explains why a blocked 445 would break M: even with good addressing.

Practice without breaking your own PC

  • Run the report-only commands anywhere. ipconfig /all, netstat -a -n -o, whoami /all, and gpresult /r are safe on your own machine, and their output makes the table stick.
  • Use a virtual machine for the rest. Practice diskpart, format, rmdir /s, and robocopy /mir in a VM with a spare virtual disk. Never run clean in diskpart on a real machine to see what happens.
  • Make /? a habit. Type robocopy /? or netstat /? before you guess a switch. CompTIA lists it as its own item for a reason.

Graphical tools such as Event Viewer and Disk Management are covered in the Windows tools and settings guide. Linux equivalents are in the macOS and Linux guide. When you can name the command from the task, check yourself on A+ command-line scenarios with explained answers in Passy, or start with the free A+ practice questions.

Trust the source

Official sources

Exam policies can change. Use these primary sources for the most current details.