Open GPJDE opened 6 months ago
Hi @GPJDE , there are 2 issues in your workflow file.
The first one is about how to use the right Azure PowerShell version with Azure PowerShell Action. If you want to use the specific Azure PowerShell version, please set the value of "azPSVersion". E.g.
- name: Run powershell command in US Gov Cloud
uses: azure/powershell@v2
with:
inlineScript: "Get-AzContext"
azPSVersion: "11.6.0"
You can find all Azure PowerShell versions on PSGallery.
The second one is about how to install "Az.ImageBuilder". According to Az.ImageBuilder, this module is not GAed yet. That means it's not included by Az
. You can check the "Package Details" of Az.
Please install AzPreview instead. Or install Az.ImageBuilder directly.
Thanks @YanaXu , in the yaml file, the error section has mention azPSVersion: "latest" and the install section runs "Install-Module Az.ImageBuilder" as per logs it seems to use : "AzVersion": "11.3.1" The error reports the command to be available in the module but it could not load the module ??
eports the command to
Please provide the workflow file and the log.
modules are installed from PSGallery Run azure/powershell@v1 using the shell PWSH
Calls an inline script and stops with error: "The 'Get-AzImageBuilderTemplate' command was found in the module 'Az.ImageBuilder', but the module could not be | loaded. For more information, run 'Import-Module Az.ImageBuilder'. Error: Error: The process 'C:\Program Files\PowerShell\7\pwsh.exe' failed with exit code 1"
We have 3 separate workflows and all fails due to this error. Please guide.