Gets the effective execution policy for the current shell.
Snap-In: Microsoft.PowerShell.Security
Syntax:
Get-ExecutionPolicy
[-Verbose] [-Debug] [-ErrorAction <ActionPreference>] [-ErrorVariable <String>] [-OutVariable <String>] [-OutBuffer <Int32>]
Description:
The Get-ExecutionPolicy Cmdlet outputs one of the string values "Unrestricted", "RemoteSigned", "Al lSigned", or "Restricted" based on the effective execution policy of the current shell. Local machine group policy setting precedes current user group policy setting, which precedes local 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.