OS management

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:

  1. gpupdate
  2. gpresult
  3. 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 /force on the target computer applies the change immediately.

Exam Tip:

  • Know that gpupdate refreshes policies, and /force ensures 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 /r on that computer and sees the policy denying folder access is active, confirming the source of the problem.

Exam Tip:

  • Know that gpresult checks 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 /scannow repairs Windows system files.
  • You may see questions like: Which tool repairs corrupted system files? → Answer: sfc.

Summary Table for Quick Exam Review

ToolPurposeCommon Switch / CommandIT Example Use Case
gpupdateRefreshes applied Group Policy settings/forceApply a newly created password policy immediately
gpresultShows effective Group Policy on a computer/user/r or /h report.htmlTroubleshoot why a user cannot access network resources
sfcScans and repairs corrupted Windows system files/scannowFix Windows Explorer not starting or crashing apps

Exam Tips for 220-1202

  1. Understand the difference between gpupdate and gpresult:
    • gpupdate applies policies.
    • gpresult checks which policies are applied.
  2. sfc is your go-to repair tool for system files.
  3. Remember the common switches: /force (gpupdate), /r (gpresult), /scannow (sfc).
  4. These commands require admin rights to run fully in most cases.

Buy Me a Coffee