GetExecutionPolicyCommand GetExecutionPolicyCommand GetExecutionPolicyCommand Class

Definition

Defines the implementation of the 'Get-ExecutionPolicy' cmdlet. This cmdlet gets the effective execution policy of the shell.

In priority-order (highest priority first,) these come from:

  • Machine-wide Group Policy
  • Current-user Group Policy
  • Current session preference
  • Current user machine preference
  • Local machine preference
[System.Management.Automation.Cmdlet("Get", "ExecutionPolicy", HelpUri="https://go.microsoft.com/fwlink/?LinkID=113315")]
[System.Management.Automation.OutputType(typeof(Microsoft.PowerShell.ExecutionPolicy))]
public class GetExecutionPolicyCommand : System.Management.Automation.PSCmdlet
type GetExecutionPolicyCommand = class
    inherit PSCmdlet
Public Class GetExecutionPolicyCommand
Inherits PSCmdlet
Inheritance
GetExecutionPolicyCommandGetExecutionPolicyCommandGetExecutionPolicyCommand
Attributes

Constructors

GetExecutionPolicyCommand() GetExecutionPolicyCommand() GetExecutionPolicyCommand()

Properties

CommandOrigin CommandOrigin CommandOrigin Inherited from InternalCommand
CommandRuntime CommandRuntime CommandRuntime Inherited from Cmdlet
CurrentPSTransaction CurrentPSTransaction CurrentPSTransaction Inherited from Cmdlet
Events Events Events Inherited from PSCmdlet
Host Host Host Inherited from PSCmdlet
InvokeCommand InvokeCommand InvokeCommand Inherited from PSCmdlet
InvokeProvider InvokeProvider InvokeProvider Inherited from PSCmdlet
JobManager JobManager JobManager Inherited from PSCmdlet
JobRepository JobRepository JobRepository Inherited from PSCmdlet
List List List

Gets or sets the List parameter, which lists all scopes and their execution policies.

MyInvocation MyInvocation MyInvocation Inherited from PSCmdlet
PagingParameters PagingParameters PagingParameters Inherited from PSCmdlet
ParameterSetName ParameterSetName ParameterSetName Inherited from PSCmdlet
Scope Scope Scope

Gets or sets the scope of the execution policy.

SessionState SessionState SessionState Inherited from PSCmdlet
Stopping Stopping Stopping Inherited from Cmdlet

Methods

BeginProcessing() BeginProcessing() BeginProcessing()

Outputs the execution policy.

CurrentProviderLocation(String) CurrentProviderLocation(String) CurrentProviderLocation(String) Inherited from PSCmdlet
EndProcessing() EndProcessing() EndProcessing() Inherited from Cmdlet
GetResolvedProviderPathFromPSPath(String, ProviderInfo) GetResolvedProviderPathFromPSPath(String, ProviderInfo) GetResolvedProviderPathFromPSPath(String, ProviderInfo) Inherited from PSCmdlet
GetResourceString(String, String) GetResourceString(String, String) GetResourceString(String, String) Inherited from Cmdlet
GetUnresolvedProviderPathFromPSPath(String) GetUnresolvedProviderPathFromPSPath(String) GetUnresolvedProviderPathFromPSPath(String) Inherited from PSCmdlet
GetVariableValue(String) GetVariableValue(String) GetVariableValue(String) Inherited from PSCmdlet
GetVariableValue(String, Object) GetVariableValue(String, Object) GetVariableValue(String, Object) Inherited from PSCmdlet
Invoke() Invoke() Invoke() Inherited from Cmdlet
Invoke<T>() Invoke<T>() Invoke<T>() Inherited from Cmdlet
ProcessRecord() ProcessRecord() ProcessRecord() Inherited from Cmdlet
ShouldContinue(String, String) ShouldContinue(String, String) ShouldContinue(String, String) Inherited from Cmdlet
ShouldContinue(String, String, Boolean, Boolean) ShouldContinue(String, String, Boolean, Boolean) ShouldContinue(String, String, Boolean, Boolean) Inherited from Cmdlet
ShouldContinue(String, String, Boolean, Boolean, Boolean) ShouldContinue(String, String, Boolean, Boolean, Boolean) ShouldContinue(String, String, Boolean, Boolean, Boolean) Inherited from Cmdlet
ShouldProcess(String) ShouldProcess(String) ShouldProcess(String) Inherited from Cmdlet
ShouldProcess(String, String) ShouldProcess(String, String) ShouldProcess(String, String) Inherited from Cmdlet
ShouldProcess(String, String, String) ShouldProcess(String, String, String) ShouldProcess(String, String, String) Inherited from Cmdlet
ShouldProcess(String, String, String, ShouldProcessReason) ShouldProcess(String, String, String, ShouldProcessReason) ShouldProcess(String, String, String, ShouldProcessReason) Inherited from Cmdlet
StopProcessing() StopProcessing() StopProcessing() Inherited from Cmdlet
ThrowTerminatingError(ErrorRecord) ThrowTerminatingError(ErrorRecord) ThrowTerminatingError(ErrorRecord) Inherited from Cmdlet
TransactionAvailable() TransactionAvailable() TransactionAvailable() Inherited from Cmdlet
WriteCommandDetail(String) WriteCommandDetail(String) WriteCommandDetail(String) Inherited from Cmdlet
WriteDebug(String) WriteDebug(String) WriteDebug(String) Inherited from Cmdlet
WriteError(ErrorRecord) WriteError(ErrorRecord) WriteError(ErrorRecord) Inherited from Cmdlet
WriteInformation(InformationRecord) WriteInformation(InformationRecord) WriteInformation(InformationRecord) Inherited from Cmdlet
WriteInformation(Object, String[]) WriteInformation(Object, String[]) WriteInformation(Object, String[]) Inherited from Cmdlet
WriteObject(Object) WriteObject(Object) WriteObject(Object) Inherited from Cmdlet
WriteObject(Object, Boolean) WriteObject(Object, Boolean) WriteObject(Object, Boolean) Inherited from Cmdlet
WriteProgress(ProgressRecord) WriteProgress(ProgressRecord) WriteProgress(ProgressRecord) Inherited from Cmdlet
WriteVerbose(String) WriteVerbose(String) WriteVerbose(String) Inherited from Cmdlet
WriteWarning(String) WriteWarning(String) WriteWarning(String) Inherited from Cmdlet

Applies to