1.5 Given a scenario, use the appropriate Microsoft command-line tools.
📘CompTIA A+ Core 2 (220-1202)
OS Management Command-Line Tools
In Windows, command-line tools help administrators quickly manage, troubleshoot, and enforce system settings without using the graphical interface. For exam purposes, three main tools are tested under OS management:
- gpupdate
- gpresult
- sfc
Let’s go through each.
1. gpupdate (Group Policy Update)
Purpose:gpupdate is used to refresh Group Policy settings on a Windows computer. Group Policy controls what users and computers can do on a network (like restricting software installations or enforcing password rules).
Key Points:
- Runs in Command Prompt (cmd).
- Updates local and network policies immediately instead of waiting for automatic update cycles.
- Commonly used by IT admins when a policy change is made and needs to take effect right away.
How to use:
gpupdate
- This updates both user and computer policies.
gpupdate /force
- Forces all policies to reapply, even if they haven’t changed.
Real IT scenario:
- An administrator just changed a policy to prevent users from accessing Control Panel. Normally, the change takes some time. Running
gpupdate /forceon the target computer applies the change immediately.
Exam Tip:
- Know that
gpupdaterefreshes policies, and/forceensures all policies are reapplied.
2. gpresult (Group Policy Result)
Purpose:gpresult shows the effective Group Policy settings that are applied to a computer or a user. It’s essentially a report tool to see which policies are active.
Key Points:
- Runs in Command Prompt (cmd).
- Useful for troubleshooting policy issues.
- Shows information like:
- Which GPOs (Group Policy Objects) are applied.
- Security group memberships.
- Whether policies were applied successfully.
How to use:
gpresult /r
- Shows a summary of applied policies for the current user and computer.
gpresult /h report.html
- Generates a detailed HTML report for easier viewing.
Real IT scenario:
- A user complains they cannot access a network folder. An IT admin runs
gpresult /ron that computer and sees the policy denying folder access is active, confirming the source of the problem.
Exam Tip:
- Know that
gpresultchecks and displays applied policies. - You might be asked: Which command shows the applied group policies? → Answer:
gpresult.
3. sfc (System File Checker)
Purpose:sfc scans and repairs corrupted Windows system files. This is essential when Windows behaves strangely, crashes, or fails to run certain programs.
Key Points:
- Runs in Command Prompt with administrative rights.
- Scans protected system files against the Windows file cache.
- Can repair corrupted or missing files automatically.
How to use:
sfc /scannow
- Scans all protected system files and repairs them if possible.
sfc /verifyonly
- Only checks for corruption, does not repair files.
Real IT scenario:
- A computer cannot start Windows Explorer properly. An IT admin runs
sfc /scannow. The tool finds a corrupted file and replaces it with a correct version from the system cache, fixing the issue without reinstalling Windows.
Exam Tip:
- Remember:
sfc /scannowrepairs Windows system files. - You may see questions like: Which tool repairs corrupted system files? → Answer:
sfc.
Summary Table for Quick Exam Review
| Tool | Purpose | Common Switch / Command | IT Example Use Case |
|---|---|---|---|
| gpupdate | Refreshes applied Group Policy settings | /force | Apply a newly created password policy immediately |
| gpresult | Shows effective Group Policy on a computer/user | /r or /h report.html | Troubleshoot why a user cannot access network resources |
| sfc | Scans and repairs corrupted Windows system files | /scannow | Fix Windows Explorer not starting or crashing apps |
Exam Tips for 220-1202
- Understand the difference between
gpupdateandgpresult:gpupdateapplies policies.gpresultchecks which policies are applied.
- sfc is your go-to repair tool for system files.
- Remember the common switches:
/force(gpupdate),/r(gpresult),/scannow(sfc). - These commands require admin rights to run fully in most cases.
