4.8 - Scripting basics and prohibited-content handling

CompTIA A+ Core 2 objective 4.8 covers basic scripting and professional conduct. If, while repairing a PC, you find files that appear to be illegal content, stop and report it per company policy rather than investigating yourself. Scripting is a legitimate, common part of IT support - automating drive maps, installs and backups, or pushing a startup script to many PCs - but running an unreviewed script downloaded from the internet is risky because it may run malicious or destructive commands. You should also recognise script types by extension; a .sh file is a Linux/Unix shell script. Expect scenario questions that describe finding prohibited content, a scripting use case, or a risky script and ask for the correct professional or safe action.

Memory hook
Find illegal content = stop and report per policy (don't investigate). Scripting good uses = automate drive maps/installs/backups. Unreviewed downloaded script = risky (may run destructive commands). .sh = Linux/Unix shell script.

Practice questions

1. While repairing a PC you find files that appear to be illegal content. What should you do?

  • Quietly delete the files
  • Stop and report per company policy (correct answer)
  • Email the files to yourself
  • Ignore them and keep working

Stop work, preserve evidence and the chain of custody, and report through proper channels — don't tamper or share.

2. Which is a real RISK of running an unreviewed script downloaded from the internet?

  • It gives the whole PC a faster boot
  • It may run malicious or destructive commands (correct answer)
  • It noticeably improves the system's graphics
  • It adds more usable system memory

Scripts can automate well but also delete data, change configs or run malware — review before running, test in a sandbox.

3. Which is a legitimate, common use case for scripting in IT support?

  • Spreading malware across the network
  • Automating drive maps, installs, backups (correct answer)
  • Deliberately slowing the whole network
  • Deleting user files at random

Scripts automate repetitive admin: drive mapping, app installs, updates, backups and gathering info — review before running.

4. Which file extension indicates a Linux/Unix shell script?

  • .bat
  • .sh (correct answer)
  • .ps1
  • .vbs

.sh = shell script (Linux/Unix). .bat/.cmd=Windows batch, .ps1=PowerShell, .vbs=VBScript, .py=Python, .js=JavaScript.

5. Which is a good use case for a startup script pushed to many PCs?

  • Playing music in the background
  • Mapping drives and installing apps (correct answer)
  • Mining cryptocurrency on the CPU
  • Deleting user files across the disk

Scripts automate onboarding tasks: map drives, install apps, apply settings, run updates — consistent and fast at scale.

6. What is a risk of a script that isn't idempotent or is poorly tested?

  • It clearly boosts overall performance
  • Unintended repeated changes or system damage (correct answer)
  • It produces much nicer on-screen graphics
  • It adds more available storage capacity

A poorly tested script can make unintended or repeated changes, delete data or break systems — test in a sandbox first.

Related objectives