Multiple choice technology

Which execution policy is required to be set in PowerShell in order to execute unsigned PowerShell script (.ps1) files?

  1. Restricted

  2. Remotesigned

  3. AllSigned

  4. Unrestricted

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

RemoteSigned policy allows locally-created unsigned scripts to execute while requiring scripts from the internet to be signed. This provides security for downloaded content while enabling development flexibility. Unrestricted also works but is less secure.

AI explanation

To answer this question, you need to understand the different execution policies in PowerShell.

PowerShell has several execution policies that determine the level of security required to run PowerShell scripts. These policies help protect against the execution of malicious scripts.

The available execution policies are:

A) Restricted - This policy does not allow the execution of any PowerShell scripts. It is the most secure policy and is typically used in high-security environments where scripts are not allowed to run.

B) RemoteSigned - This policy allows the execution of PowerShell scripts that are locally created, but requires scripts downloaded from the internet to be digitally signed by a trusted publisher. This policy is commonly used in most environments.

C) AllSigned - This policy requires all PowerShell scripts to be digitally signed by a trusted publisher before they can be executed. This is the most secure policy and is typically used in highly regulated environments.

D) Unrestricted - This policy allows the execution of all PowerShell scripts without any restrictions. It is the least secure policy and should only be used in trusted environments.

The correct answer is B) Remotesigned. This policy allows the execution of locally created PowerShell scripts and requires digitally signed scripts downloaded from the internet. It strikes a balance between security and convenience, making it a commonly used execution policy.