Your network contains an Active Directory domain. The domain contains 10 computers that run Windows 10. Users in the finance department use the computers.
You have a computer named Computer1 that runs Windows 10.
From Computer1, you plan to run a script that executes Windows PowerShell commands on the finance department computers.
You need to ensure that you can run the PowerShell commands on the finance department computers from Computer.
What should you do on the finance department computers?
A. From Windows PowerShell, run the Enable-MMAgent cmdlet.
B. From the local Group Policy, enable the Allow Remote Shell Access setting.
C. From Windows PowerShell, run the Enable-PSRemoting cmdlet.
D. From the local Group Policy, enable the Turn on Script Execution setting.
Explanation:
about_Group_Policy_Settings
Short description
Describes the Group Policy settings for PowerShell
Long description
PowerShell includes Group Policy settings to help you define consistent configuration values for Windows computers in an enterprise environment.
The policies are as follows:
* Turn on Script Execution: Sets the PowerShell execution policy.
* Etc. (does not include Allow Remote Shell Access).
Note: Turn on script execution
The Turn on Script Execution policy setting sets the execution policy for computers and users. The execution policy determines whether to permit scripts to run.
If you enable the policy setting, you can select from among the following policy settings.
Allow only signed scripts allows scripts to execute only if they're signed by a trusted publisher. This policy setting is equivalent to the AllSigned execution policy.
Allow local scripts and remote signed scripts allows all local scripts to run. Scripts that originate from the Internet must be signed by a trusted publisher. This policy setting is equivalent to the RemoteSigned execution policy.
Allow all scripts allows all scripts to run. This policy setting is equivalent to the Unrestricted execution policy.
If you disable this policy setting, no scripts are allowed to run. This policy setting is equivalent to the Restricted execution policy.
If you don't configure this policy setting, the execution policy that's set for the computer or user by the Set-ExecutionPolicy cmdlet determines whether scripts are permitted to run. The default value is Restricted.
Reference: https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_group_policy_settings