The Get-AzLogicApp command was not found

The Get-AzLogicApp command was not found

A few weeks ago, while preparing for a PROD deployment, a small/big problem appeared on our build and release pipelines, in Azure DevOps.

Everything was running smoothly, until the last week of August 2020, when our builds started to fail with this error:

  • The ‘Get-AzLogicApp’ command was not found in the module Az.LogicApp
No alt text provided for this image

Using the Az PowerShell modules to deploy integration account artifacts was suggested by my good friend Michael Stephenson, that also taught me a few things, and his builds started to have the same problem.

We quickly jumped on a Teams call and debugged this together, that's one of the best things of working remote and with an international team, we can have different schedules but connect extremely fast.

It didn't take too long to realize that the installed PowerShell cmdlets versions were at fault here. Quite quickly we realized it was something to do with the versions of PowerShell cmdlets installed. We have a task in the pipeline which uses the below PowerShell to install and setup all of the Az cmdlets for us:

Install-Module -Name Az -AllowClobber -Force
Install-Module -Name Az.Accounts -AllowClobber -Force
Uninstall-AzureRM

Get-installedModule | select Name

The snippet installs the Az modules and we, usually for troubleshooting, make it display any modules installed as we have had other things like this happen in the past. When troubleshooting we realized that there was an update to Az.Accounts recently and version 1.9.3 was installed by default.

No alt text provided for this image

It seems like the Az.LogicApps cmdlets need Az.Accounts version 1.9.2 and we tried forcing the version back to the older v1.9.2 of Az.Accounts and this fixes the issue.

Install-Module -Name Az -AllowClobber -Force
Install-Module -Name Az.Accounts -AllowClobber -Force -RequiredVersion 1.9.2
Uninstall-AzureRM

Get-installedModule | select Name

This solution does the job until there are new updates to fix the dependencies version challenges. It might not be the best option but we found that it works for now and since this wasn't documented before, we hope that it will help someone else in the same situation.

Thanks to Michael for the help and the post mention.

要查看或添加评论,请登录

Pedro Almeida的更多文章

社区洞察

其他会员也浏览了