220-1102 exam dumps

220-1102 practice question 789 of 828

A+ Core 2. Associate level, CompTIA. Free question with the correct answer and a full explanation.

220-1102 Question 789

Single answerUse cases for scripting

A technician supports 25 Windows 10 laptops in a training lab. Each morning, temporary files in C:\Temp and old log files in C:\Logs must be deleted before students arrive. The task needs to run automatically at startup with minimal user interaction, and the technician wants a solution that is easy to update if the file paths change later. Which solution BEST meets this requirement?

  1. A

    Create a PowerShell script to remove the target files and configure it to run at startup with Task Scheduler or a startup script policy

  2. B

    Manually delete the files on each laptop every morning to ensure nothing important is removed

  3. C

    Create a spreadsheet listing the files to delete and ask users to follow the list when they log in

  4. D

    Install a Linux shell on each laptop and use a Bash script because shell scripts are better for all cleanup tasks

Show answer and explanation

Correct answer: A

Explanation

This question tests a core A+ Core 2 use case for scripting: automating repetitive system maintenance tasks. In a Windows environment, PowerShell is commonly used to perform file management, system administration, and startup or scheduled tasks. Using a script is preferable to manual processes because it improves consistency, reduces technician workload, and is easier to maintain when requirements change. Microsoft documents PowerShell as a task automation and configuration management framework for Windows, and Task Scheduler is a standard Windows tool for running scripts automatically at scheduled times or system startup. The key exam objective is recognizing when scripting is the best solution for repetitive, predictable administrative work.

  • A. Correct.

    Correct. A PowerShell script is an appropriate scripting solution for automating repetitive administrative tasks on Windows systems, such as deleting temporary and log files. Running it at startup through Task Scheduler or a startup script provides the required automation with minimal user interaction. It is also easy to modify later if the file paths change, which is a key advantage of scripting in real-world support environments.

  • B. Incorrect.

    Incorrect. Manual deletion does not scale well across 25 systems and does not meet the requirement for automation. Although a technician might choose this approach out of caution, it is inefficient, inconsistent, and more prone to being skipped or performed differently on different systems.

  • C. Incorrect.

    Incorrect. A spreadsheet is documentation, not automation. This option relies on end users to perform an administrative task correctly, which increases the chance of errors and does not satisfy the requirement to run automatically at startup. A candidate might pick this if they confuse process documentation with scripting-based task automation.

  • D. Incorrect.

    Incorrect. Bash is a valid scripting environment in many systems, but installing a Linux shell on each Windows laptop adds unnecessary complexity for a simple Windows administrative task. In an A+ context, the best practice is to use the native Windows scripting tool that fits the environment, which is PowerShell.

Timed practice exam

Take a 220-1102 practice test under exam conditions

90 questions in 90 minutes, drawn from this bank, with a score report and a per-question review when you finish.

Start timed exam