comptia-a-plus-core2/quizzes/OPS-8-quiz.md
Ken Patmonk 0c3868ea71 quizzes: expand all 35 quizzes to 15 questions each
OPS-1 through OPS-10, OS-2, OS-3 went from 5 → 15.
OS-1, OS-4 through OS-11, SEC-1 through SEC-11, TRB-1 through TRB-4 went from 7 → 15.
Questions cover exam-weight scenarios not duplicated from original content.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-19 02:43:26 -05:00

3 KiB

OPS-8 Quiz: Scripting Basics

Take this after studying notes/OPS-8-scripting-basics.md.

Reply with answers like: 1B 2A 3D 4C 5B

Questions

  1. Which extension is commonly used for PowerShell scripts?

A. .bat
B. .ps1
C. .jpg
D. .xlsx

  1. Which extension is commonly used for Bash shell scripts?

A. .sh
B. .docx
C. .png
D. .iso

  1. What is a common scripting use case?

A. Physically lifting a printer
B. Replacing toner
C. Automating software installation
D. Cleaning a monitor

  1. What is a risk of running an unknown script?

A. It may change settings or introduce malware
B. It always improves security
C. It cannot affect files
D. It disables all permissions

  1. What should you do before broad script deployment?

A. Skip testing
B. Test and review the script
C. Delete all backups
D. Disable rollback

  1. Which scripting language is built into Windows and designed specifically for system administration?

A. Python
B. Bash
C. Ruby
D. PowerShell

  1. A technician writes a script that loops through a list of computers and installs an agent on each one. Which concept does this demonstrate?

A. Manual installation
B. Automation through scripting
C. Physical deployment
D. Manual network mapping

  1. What is a variable in a script?

A. A fixed hardware setting
B. A named storage location for a value used in the script
C. A type of network cable
D. A drive partition type

  1. A Bash script begins with #!/bin/bash. What is the purpose of this line?

A. It comments out the first line
B. It specifies which interpreter should run the script
C. It encrypts the script
D. It sets the working directory

  1. A technician downloads a script from an untrusted website and runs it. What is the primary risk?

A. The script may update drivers automatically
B. The script may execute malicious commands with the user's permissions
C. The script may slow internet speed slightly
D. The script may change the desktop background

  1. A PowerShell script fails with an execution policy error. What is the likely cause?

A. The script has a syntax error
B. PowerShell execution policy is set to Restricted
C. The script file is on a network drive
D. The screen saver is active

  1. In a batch script, what does echo off do?

A. Turns off the monitor
B. Suppresses the display of commands as they run
C. Deletes output files
D. Disables all error messages

  1. Which Windows environment variable stores the path to the current user's home folder?

A. %SYSTEMROOT%
B. %PATH%
C. %USERPROFILE%
D. %APPDATA%

  1. A Bash script needs to run a command as root. Which prefix enables this?

A. run
B. admin
C. sudo
D. root

  1. Which cmdlet in PowerShell retrieves information about running processes?

A. Get-Service
B. Get-EventLog
C. Get-Process
D. Get-Item

Answer Key For Instructor

  1. B
  2. A
  3. C
  4. A
  5. B
  6. D
  7. B
  8. B
  9. B
  10. B
  11. B
  12. B
  13. C
  14. C
  15. C