0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

任意のタイミングでps1スクリプトを(一般ユーザで)実行できるようにするコマンド Set-ExecutionPolicy

Posted at

概要

一般ユーザで
平常時はスクリプト実行ポリシーは初期値のままにしておき、
特定のPowershellコンソールセッション(プロセス単位)に限り、任意のタイミングでps1スクリプトを実行できるようにしたい。

コマンド

最初にこれを実行
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope Process

上記コマンドを実行したコンソール上でps1スクリプトが実行できるようになる。

コンソールを閉じて再度開くとスクリプト実行不可に戻る。
上記コマンド実行していないほかのコンソール上からもスクリプト実行はできない。

参考

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?