top of page

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

ccf代表

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

最新記事

すべて表示

Azure Container AppsでAP-DB構成を組んでみる

目的 前回「Azure Container InstancesでAP-DB構成を組んでみる」で、ACIを使ったコンテナ構成を組んでみましたが、Dockerよりの機能がためか、スポット的な利用であればいいのですが、絶えず動かしておくには少しコストが掛かりすぎる印象です。...

Comments


会社新ロゴ_20170412.png

Copyright © Challenge Consulting Firm All Rights Reserved.

  • Google+ - Grey Circle
bottom of page