2.1.5. Use the appropriate Microsoft command-line tools. (Obj. 1.5)
š” First Principle: The command line offers powerful, direct control for efficient troubleshooting and administration that is often faster than using the GUI.
The command-line interface (CLI) is an essential tool for any serious IT technician. While the GUI is great for visual tasks, the CLI provides a faster, more direct, and often more powerful way to interact with the operating system, especially for networking and system file tasks. Windows provides two main CLI environments: the traditional Command Prompt (cmd.exe
) and the more modern and powerful PowerShell. For the A+ exam, you must be familiar with a core set of commands that are used for everyday diagnostics and repair. Remember, for many of these commands to work correctly, you must run the CLI "As Administrator" by right-clicking it and selecting that option.
- Networking:
ipconfig
: The most fundamental networking command. Use it to quickly view the IP address, subnet mask, and default gateway. Useipconfig /all
to see detailed information, including MAC addresses and DNS server addresses.ipconfig /release
and/renew
are used to get a new IP address from a DHCP server.ipconfig /flushdns
clears the local DNS cache, which can resolve browsing issues.ping
: Tests basic connectivity to another device (e.g.,ping 8.8.8.8
orping www.google.com
). It sends a small packet and waits for a reply. If you get a reply, you know there is a network path between you and the destination.tracert
: Traces the "hops" (routers) a packet takes to reach a destination. Useful for diagnosing where a network connection is failing along the path.netstat
: Displays active network connections, listening ports, and network statistics.netstat -an
is useful for seeing all connections and the ports they are using.
- System & Disk:
sfc
(System File Checker): A critical repair tool.sfc /scannow
scans all protected Windows system files and replaces any that are corrupt or missing with a cached copy.chkdsk
(Check Disk): Scans a disk's file system for logical errors.chkdsk /f
attempts to fix any errors it finds.chkdsk /r
locates bad sectors on the disk and attempts to recover readable information (this implies/f
).diskpart
: A powerful CLI tool for advanced disk and partition management, allowing you to do everything Disk Management can do, but from the command line.gpupdate /force
: In a corporate domain environment, this command forces the client to immediately contact the domain controller and re-apply any Group Policy settings.gpresult /r
: Shows which Group Policies are currently being applied to the user and computer, which is invaluable for troubleshooting policy-related issues.
Technician's Diagnostic Path: Scenario: A user calls and says they suddenly can't access the company intranet site or any network shares, but they believe their internet is working because they can get to Google.
- Initial Test (ping by name): Open a command prompt. The first step is to test name resolution. Type
ping intranet.corp.local
(replacing with the actual intranet server name). If this fails, it suggests a DNS problem. - Isolate the Issue (ping by IP): Ask a colleague for the IP address of the intranet server (e.g.,
10.10.5.20
). Now,ping 10.10.5.20
. If this ping succeeds while the ping by name failed, you have confirmed the issue is with DNS. The user has connectivity to the internal network but cannot resolve internal names. - Gather More Data (
ipconfig /all
): Runipconfig /all
. Examine the output for the "DNS Servers" line. You might find that the user's machine is pointing to a public DNS server (like8.8.8.8
) instead of the required internal corporate DNS server. This would explain why they can reach external sites (Google) but not internal ones. - Implement the Fix: Based on this finding, go into the user's network adapter's IPv4 properties and manually set the correct internal DNS server address.
- Verify (
ipconfig /flushdns
and ping): Runipconfig /flushdns
to clear out any bad cached entries. Then,ping intranet.corp.local
again. It should now succeed, and the user should be able to access all internal resources.
Reflection Question: You are troubleshooting a "no internet" issue. You use ipconfig
and see the user has an IP address of 169.254.10.20. What does this tell you, and what is your next troubleshooting step?