easyMultiple ChoiceObjective-mapped
220-1102 Practice Question: That a PowerShell script they wrote to rename…
A user reports that a PowerShell script they wrote to rename multiple files in a folder works on their desktop but fails with a 'permission denied' error when run from a network folder. The user has full control of the network folder. What is the most likely cause?
⚠ Common exam trap
CompTIA often tests the misconception that 'permission denied' always relates to NTFS or share permissions, when in fact PowerShell's execution policy can block scripts from network locations even if the user has full control.
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
✓
The execution policy is set to RemoteSigned, which blocks scripts from network locations.
The PowerShell execution policy controls which scripts can run and from where. The RemoteSigned policy requires that scripts from the internet (including network shares) be digitally signed, and it treats network drives as an 'internet' zone. When the script is run from a network folder, the policy blocks execution unless the script is signed, resulting in a 'permission denied' error, even though the user has full NTFS permissions.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
The script uses a cmdlet that is not available on the network drive.
Why it's wrong here
Cmdlets are compiled binaries or functions loaded into a PowerShell session from modules, which are typically installed locally on the system. Their availability is determined by the installed modules and the PowerShell environment configuration, not by the specific drive or network share where a script file is stored. Therefore, a cmdlet's functionality would not be dependent on the script's location on a network drive, making this option incorrect.
- ✓
The execution policy is set to RemoteSigned, which blocks scripts from network locations.
Why this is correct
The RemoteSigned execution policy is a security measure that mandates all PowerShell scripts originating from the internet or network shares must be digitally signed by a trusted publisher to execute. While locally created scripts can run without a signature, PowerShell classifies scripts executed directly from a network location as 'remote.' This policy prevents the execution of unsigned network scripts, often resulting in an 'Access Denied' or similar error, directly addressing the reported issue.
- ✗
The network folder has a space in its name.
Why it's wrong here
While spaces in file paths can sometimes cause issues if not properly handled in older command-line environments, PowerShell is robust and designed to manage such paths effectively. Enclosing the path in double quotes, such as & "C:\My Folder\script.ps1", or using tab completion automatically resolves this common scenario. A space in a folder name, if not properly quoted, would typically lead to a 'file not found' or a syntax parsing error, not a 'permission denied' or execution policy restriction.
- ✗
The user is not running PowerShell as an administrator.
Why it's wrong here
Running PowerShell as an administrator grants elevated privileges necessary for system-wide changes, such as modifying protected system files, installing software, or altering system configurations. However, executing a PowerShell script that merely renames files within a user's accessible network folder does not typically require these elevated administrative rights. If the user possesses standard read, write, and modify permissions on the specific network folder, they can rename files without needing to run PowerShell with administrator privileges.
Go deeper
Related to this question
Learn chapter
File Systems: NTFS, FAT32, exFAT
Key term
PowerShell
PowerShell is a task automation and configuration management framework from Microsoft, consisting of a command-line shell and a scripting language built on the .NET framework.
Key term
Folder
A folder is a logical container used to organize and group digital files, resources, or cloud-based assets within a system or platform.
About these practice questions
Courseiva writes every 220-1202 question from scratch — 495 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. 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.