LoginSignup
1
1

More than 1 year has passed since last update.

PowerShellを管理者権限で実行

Last updated at Posted at 2021-03-31

最もシンプルな方法は、実行ファイル(.ps1)を右クリックで「管理者として実行」…違う違うそうじゃない。プログラム上でまかなえる方法をお探しでしょう。

シンプルに以下のようにファイル内の先頭に以下のおまじないを記述しておけば実現できます。

Start-Process powershell.exe -Verb runas

容量用法を守ってご使用ください。くれぐれもお気をつけて。

1
1
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
1
1