n3s0 || journal

Getting the Default Execution Policy In PowerShell

Posted on 1 min

PowerShell

Overview

My notes for obtaining the Execution Policy for PowerShell.

Get The Execution Policy

Not a whole lot is needed for this command. It’s main purpose is to check the configuration of the execution policy. The Get-ExecutionPolicy Cmdlet will provide the current status of the execution policy.

Get-ExecutionPolicy

Below is the output as an example.

RemoteSigned

If review of the execution policy for the different scopes is required. The -List flag can be used. This will list the ExecutionPolicy set for the various policy scopes for review.

Get-ExecutionPolicy -List

The possible output as an example. This machine doesn’t have a whole lot configured. So it should be using the default ExecutionPolicy.


        Scope ExecutionPolicy
        ----- ---------------
MachinePolicy       Undefined
   UserPolicy       Undefined
      Process       Undefined
  CurrentUser       Undefined
 LocalMachine    	Undefined

Resources

Helpful resources that helped with this article.