Azure Function - PowerShell, installing az cmdlet :: The term 'az' is not recognized as the name of a cmdlet Azure Function - PowerShell, installing az cmdlet :: The term 'az' is not recognized as the name of a cmdlet powershell powershell

Azure Function - PowerShell, installing az cmdlet :: The term 'az' is not recognized as the name of a cmdlet


I solved the following part of your problem

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

If you execute

Test-Path -Path 'C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\wbin'

You will probably get False. This means that you need to install the Azure CLI eg from https://docs.microsoft.com/en-us/cli/azure/install-azure-cli-windows?view=azure-cli-latest


I haven't testing this myself, but according to https://blogs.msdn.microsoft.com/powershell/2017/02/24/using-powershell-modules-in-azure-functions/ you should be able to do an Import-Module. In their example...

Write-Output “Loading Wunderlist Module”import-module ‘D:\Home\site\wwwroot\HttpTriggerPowerShellDemo\Modules\Wunderlist\1.0.10\Wunderlist.psm1’$Result = Get-Help Get-WunderlistUser | Out-StringWrite-Output $Result