Azure / powershell

GH Action to run Az PowerShell scripts for developers and administrators to develop, deploy, and manage Microsoft Azure applications.
MIT License
64 stars 41 forks source link

Az.ImageBuilder module could not be loaded #105

Open GPJDE opened 6 months ago

GPJDE commented 6 months ago

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.

YanaXu commented 6 months ago

Hi @GPJDE , there are 2 issues in your workflow file.

GPJDE commented 6 months ago

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

YanaXu commented 6 months ago

eports the command to

Please provide the workflow file and the log.