# 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` 2. Which extension is commonly used for Bash shell scripts? A. `.sh` B. `.docx` C. `.png` D. `.iso` 3. What is a common scripting use case? A. Physically lifting a printer B. Replacing toner C. Automating software installation D. Cleaning a monitor 4. 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 5. What should you do before broad script deployment? A. Skip testing B. Test and review the script C. Delete all backups D. Disable rollback 6. Which scripting language is built into Windows and designed specifically for system administration? A. Python B. Bash C. Ruby D. PowerShell 7. 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 8. 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 9. 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 10. 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 11. 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 12. 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 13. Which Windows environment variable stores the path to the current user's home folder? A. `%SYSTEMROOT%` B. `%PATH%` C. `%USERPROFILE%` D. `%APPDATA%` 14. A Bash script needs to run a command as root. Which prefix enables this? A. `run` B. `admin` C. `sudo` D. `root` 15. 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