top of page

Hybrid Runbook WorkerのPowerShell実行環境への環境変数

  • ccf代表
  • 2025年2月26日
  • 読了時間: 1分

更新日:2025年4月2日

Azure Automation上のスクリプトをローカル環境でリモート実行するときに、少し時間が経つといつもつまずくことを備忘として記載します。


以下のURLにある通り、環境変数で設定しろ、書いてあるんですが、これが曲者。。。

PowerShell 7.2

To run PowerShell 7.2 runbooks on a Windows Hybrid Worker, install PowerShell on the Hybrid Worker. See Installing PowerShell on Windows.

After PowerShell 7.2 installation is complete, create an environment variable with Variable name as powershell_7_2_path and Variable value as location of the executable PowerShell. Restart the Hybrid Runbook Worker after environment variable is created successfully.

「as location of the executable PowerShell」と書いてあるので、普通はpwsh.exeのあるフォルダを指定したくなるところ。でも、うまくいかず。


pwsh.exeを含めた環境パスにしなくては行けないようです。


環境変数
powershell_7_2_path=C:\Program Files\PowerShell\7\pwsh.exe

最新記事

すべて表示
AI 開発のトークンコストを 20% 削減した話 ― ローカル圧縮プロキシ「Headroom」導入の実測レポート

AI コーディングエージェントの API コストを、開発体験を変えずに削減する。 背景:AI コーディング常用で見えてきた「文脈コスト」 社内では日常的に AI コーディングエージェント(Claude Code)を開発に組み込んでいる。 生産性は確実に上がる一方で、エージェントが ツール実行結果・ビルドログ・会話履歴 を 繰り返し LLM へ送り込む構造上、入力トークンが膨らみやすい。 実装そのも

 
 
 

コメント


bottom of page