Manage the Execution policy

  • We can use the following Cmdlet to get the effective execution policy for the current PowerShell session:

  1. Get-ExecutionPolicy  
  • We can use the following command to get all the execution policies which affect the current session. And, using this command, we display them in the precedence order.

  1. Get-ExecutionPolicy -list  

The output of the above command looks like this:

PowerShell Execution Policy
  • We can use the -Scope parameter to get the execution policy for a particular scope. For example, the following command gets the execution policy for the LocalMachine Scope:

  1. Get-ExecutionPolicy -Scope LocalMachine   

The above command will display output as RemoteSigned


Posted

in

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *