CompTIA A+ Core 2 · 220-1202
Objective 4.8: Scripting basics
Try it now: 8 quick questions on this objective, no account needed.
Objective 4.8 · Scripting
1 / 8An administrator creates a script that automatically maps network drives for all users at logon. Which script use case does this represent?
Practice questions for A+ Core 2 objective 4.8, “Scripting basics.” Every question is original, written to the 220-1202 exam objectives, and comes with a full explanation — answer them below to see instant grading.
This objective sits in Domain 4.0: Operational Procedures, which is about 21% of the exam — so mastering it moves your readiness score meaningfully.
More 4.8 practice questions
Objective 4.8 · practice questions
1 / 5A technician writes a script that inadvertently modifies registry settings on all workstations, disabling the Windows Firewall. Which scripting risk does this illustrate?
All 5 questions, with answers
1.A technician writes a script that inadvertently modifies registry settings on all workstations, disabling the Windows Firewall. Which scripting risk does this illustrate?
- A.Script execution policy misconfiguration
- B.Inadvertently changing system settings with unintended consequences
- C.Browser crashes caused by JavaScript errors
- D.Malware introduced through a downloaded script
Answer: B. Inadvertently changing system settings with unintended consequences. Scripts that interact with system settings such as the registry, Group Policy, or security configurations can cause widespread, unintended changes when not carefully tested and scoped. This is why sandbox testing and thorough review are mandatory before deploying scripts to production systems. Broad permissions and untested logic in scripts can have serious security and stability consequences.
2.A technician writes a batch (.bat) script to automatically install a software package on new workstations using silent install switches. Which scripting use case does this BEST represent?
- A.Gathering hardware information
- B.Automated application installation
- C.Remapping network drives
- D.Initiating operating system updates
Answer: B. Automated application installation. Batch scripts are commonly used to automate software deployments using vendor-provided silent install switches that suppress user prompts and automatically accept defaults. This eliminates the need for manual installation on each workstation and reduces deployment time at scale. Automating application installation is one of the most common and valuable scripting use cases in IT operations.
3.A technician needs to write a simple script to automate file backups on a Linux server. Which script type would be MOST appropriate?
- A..bat
- B..vbs
- C..ps1
- D..sh
Answer: D. .sh. Shell scripts (.sh) are the standard automation tool for Unix/Linux environments, providing native access to system utilities, file operations, and scheduling via cron. They can perform complex file operations, compress archives, and transfer files using built-in Linux tools. A .bat file is Windows-only, and VBScript is a Windows-specific language.
4.A technician uses a Python script to collect hardware information — CPU, RAM, and storage details — from hundreds of workstations automatically. What scripting use case does this represent?
- A.Automated backup
- B.Installation of applications
- C.Gathering system information and data
- D.Remapping drives
Answer: C. Gathering system information and data. Scripts that collect system data — such as hardware specifications, installed software inventories, or event log entries — automate what would otherwise be a manual and time-consuming process across many machines. This use case is common in asset management and compliance auditing. Python is well-suited for this due to its cross-platform libraries and ease of use.
5.A technician needs to allow PowerShell scripts to run on a workstation where execution is currently restricted. Which command changes the policy to allow locally created scripts?
- A.Set-ExecutionPolicy Unrestricted
- B.Set-ExecutionPolicy RemoteSigned
- C.Set-ExecutionPolicy AllSigned
- D.Enable-PSRemoting
Answer: B. Set-ExecutionPolicy RemoteSigned. Set-ExecutionPolicy RemoteSigned allows locally created scripts to run without a signature while requiring scripts downloaded from the internet to be digitally signed, striking a balance between usability and security. RemoteSigned is more secure than Unrestricted, which allows all scripts regardless of origin or signature. "RemoteSigned = local scripts OK, remote scripts must be signed."
Learn 4.8 and every other objective
Your A+ Core 2 path walks the whole exam in short stops, one objective at a time, and maps where you stand as you go.
Start my A+ Core 2 pathNo account needed to start.