easyMultiple ChoiceObjective-mapped
220-1102 Practice Question: Deploy a PowerShell script to 50 Windows 10…
A technician needs to deploy a PowerShell script to 50 Windows 10 workstations that will install a security update silently. The script must run with administrative privileges. Which method should the technician use to ensure the script executes properly without user interaction?
⚠ Common exam trap
CompTIA often tests the misconception that double-clicking a .ps1 file executes it like a batch file, when in reality it opens in an editor, and that 'Start-Process' without elevation is sufficient for administrative tasks.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Run the script via 'powershell.exe -ExecutionPolicy Bypass -File script.ps1' from an elevated command prompt
Running 'powershell.exe -ExecutionPolicy Bypass -File script.ps1' from an elevated command prompt bypasses PowerShell's execution policy for that session and ensures the script runs with administrative privileges. This combination allows silent, unattended execution of the security update installation across multiple workstations without user interaction.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Double-click the script file on each workstation
Why it's wrong here
Double-clicking a PowerShell script typically opens it in an editor or attempts to execute it under the default PowerShell execution policy, which is often 'Restricted' or 'RemoteSigned' on client machines. This policy prevents unsigned scripts from running, especially those downloaded from the internet, leading to execution failure. Furthermore, this method requires manual intervention on each workstation, making it impractical for large-scale deployments and does not guarantee administrative privileges necessary for many deployment tasks.
- ✓
Run the script via 'powershell.exe -ExecutionPolicy Bypass -File script.ps1' from an elevated command prompt
Why this is correct
Executing the script using 'powershell.exe -ExecutionPolicy Bypass -File script.ps1' from an elevated command prompt is the most effective method for deploying a PowerShell script requiring administrative privileges. The '-ExecutionPolicy Bypass' parameter temporarily overrides the system's execution policy for the current session, allowing the script to run without restrictions. When launched from an elevated command prompt, the script inherits administrative rights, ensuring it can perform system-level changes, and the '-File' parameter specifies the script to execute directly.
- ✗
Use the 'Start-Process' cmdlet without elevation
Why it's wrong here
Using the 'Start-Process' cmdlet without explicitly requesting elevation (e.g., using the '-Verb RunAs') will execute the script under the current user's security context, which typically lacks administrative privileges. Many deployment scripts require elevated permissions to modify system settings, install software, or access protected resources. Consequently, the script would likely encounter "Access Denied" errors and fail to complete its intended tasks, rendering this method unsuitable for administrative deployments.
- ✗
Copy the script to the Startup folder
Why it's wrong here
Placing a script in the Startup folder (e.g., 'shell:startup' or 'shell:common startup') causes it to execute automatically when a user logs in or the system starts, respectively. However, scripts run from these locations inherit the privileges of the logged-in user, which are standard user privileges, not administrative. Furthermore, the default PowerShell execution policy would still apply, potentially blocking the script from running if it's not signed or if the policy is restrictive, making it unreliable for administrative deployment.
Go deeper
Related to this question
Learn chapter
Windows Editions and Features
Key term
Security update
A security update is a software patch released to fix a vulnerability that could be exploited by attackers to compromise a system.
Key term
Windows
Windows is a family of operating systems developed by Microsoft that manages computer hardware and software, providing a graphical user interface for users to interact with their devices.
About these practice questions
One of 495 original 220-1202 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This 220-1202 practice question is part of Courseiva's free CompTIA certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the 220-1202 exam.