You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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 Clouduses: azure/powershell@v2with:
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 ??
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.
The text was updated successfully, but these errors were encountered: