獲取當前的執行策略

獲得當前會話的有效執行策略:

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