I am attempting to install the az cmdlet onto Kudu for my Azure Function. I am currently following this guide:
How to install a PowerShell module in an Azure Function
... however - I am still getting the following error within my Azure Function:
az : The term 'az' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
at run.ps1: line 1
Steps I have done till now:
- Created a
modulefolder underD:\home\site\wwwroot\Communication_with_Azure_Container_Registry\> Within the
modulefolder I have added the contents ofazure-cli/2.0.35/..., (which looks like this):
... Azure Function code is very simple to proof out the ability to install the cmdlet:
if (-not (Get-Module -Name "az")) { Write-Output "azure-cli not installed"; } else { Write-Output "azure-cli installed"; } $test = 'az --help' Invoke-Expression $test Write-output `n$test
Question:
- Is there something within my configuration that is not allowing for the
azcmdlet to install? - Is there an alternative way to gain access to the
azure-cliwithout implementing thenodemodule?
python.exe -m pip install azure-clibut I am not sure where that was saved ... - jdaveazure-clifrom my Azure Function in order to communicate with my Azure Container Registry - to invoke a Docker container as a Azure Instance Container. - jdave