windows:powershell:commands:execution_policy

文書の過去の版を表示しています。


Get-ExecutionPolicy/Set-ExecutionPolicy

コンピューターの PowerShell 実行ポリシーを取得/設定する。
動作: Windows/Linux

Windows

PS > Get-ExecutionPolicy
RemoteSigned
 
PS > Get-ExecutionPolicy -List
 
        Scope ExecutionPolicy
        ----- ---------------
MachinePolicy       Undefined
   UserPolicy       Undefined
      Process       Undefined
  CurrentUser       Undefined
 LocalMachine    RemoteSigned

Linux

PS > Get-ExecutionPolicy
Unrestricted
PS > Get-ExecutionPolicy -List
 
        Scope ExecutionPolicy
        ----- ---------------
MachinePolicy    Unrestricted
   UserPolicy    Unrestricted
      Process    Unrestricted
  CurrentUser    Unrestricted
 LocalMachine    Unrestricted

Windows

PS > Set-ExecutionPolicy RemoteSigned

or

PS > Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope LocalMachine

Linux

PS > Set-ExecutionPolicy RemoteSigned
Set-ExecutionPolicy: Operation is not supported on this platform.
  • windows/powershell/commands/execution_policy.1582389000.txt.gz
  • 最終更新: 2020/02/23 01:30
  • by ともやん