Set the execution policy for the current shell.
Snap-In: Microsoft.PowerShell.Security
Syntax:
Set-ExecutionPolicy
[-ExecutionPolicy] <ExecutionPolicy> [-Verbose] [-Debug] [-ErrorAction <ActionPreference>] [-ErrorVariable <String>] [-OutVariable <String>] [-OutBuffer <Int32>] [-WhatIf] [-Confirm]
Description:
The Set-ExecutionPolicy Cmdlet writes the execution policy into the local preference setting in the registry. It warns you if the local setting is overridden by group policy. The registry setting remains updated regardless. It is important to note that this cmdlet can't be used to modify group policy setting. Restricted - Default execution policy. - Does not run scripts. - Interactive only. AllSigned - Runs scripts. - All must be signed by a publisher that you trust. RemoteSigned - Runs scripts. - Downloaded files must be signed by a publisher that you trust. Unrestricted - Runs scripts. - No digital signature is required.