LoginSignup
3
2

More than 5 years have passed since last update.

バッチファイルを経由すればPowerShellファイルの実行権限を変えずに指定権限で実行できた

Posted at

方法

sample.bat
powershell -ExecutionPolicy RemoteSigned -File ./sample.ps1

2018-09-25_21h52_35.png

利用シーン

  • 権限設定(Set-ExecutionPolicy)せずにPowerShellファイルを実行したい
    • PowerShellって何?って人に「とりあえずこのバッチたたけばOK」とする
    • お客様環境等でPCの権限関係を変更をしたくない
3
2
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
3
2