获取当前的执行策略

获得当前会话的有效执行策略:

PS> Get-ExecutionPolicy
RemoteSigned

列出当前会话的所有有效执行策略:

PS> Get-ExecutionPolicy -List

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

列出特定范围的执行策略,例如。处理:

PS> Get-ExecutionPolicy -Scope Process
Undefined