36. Which of the following script types requires that the system mode is set to Unrestricted to run unsigned scripts?
Answer: C
Only PowerShell scripts (.ps1) require the system mode to be set to Unrestricted to run unsigned scripts.
PowerShell scripts, denoted by the .ps1 extension, necessitate that the execution policy is configured to Unrestricted in order to execute scripts that are not digitally signed. This is a specific requirement associated with the security model of PowerShell.
A) .js
JavaScript files, indicated by the .js extension, do not require any specific execution policy settings to run. They can be executed directly within environments such as web browsers or Node.js, making their execution independent of the system mode settings.
B) .py
Python scripts, represented by the .py extension, do not have restrictions based on execution policies like PowerShell does. They can be run in any environment that has Python installed without needing any specific setting for unsigned scripts.
C) .ps1
PowerShell scripts (.ps1) specifically require the execution policy to be set to Unrestricted in order to run unsigned scripts. This policy is a security measure designed to prevent the execution of potentially harmful scripts without user consent.
D) .bat
Batch files, marked with the .bat extension, can execute without the need for specific execution policy settings. They are processed by the command line interpreter in Windows and do not face restrictions related to script signing.
Conclusion
The requirement for PowerShell scripts (.ps1) to have the execution policy set to Unrestricted for running unsigned scripts is a unique characteristic of the PowerShell environment. In contrast, other script types like .js, .py, and .bat do not impose such restrictions, allowing them to run without specific policy configurations. Thus, option C is definitively correct as it directly addresses the question's focus on execution policies for unsigned scripts.