Unable to trigger powershell scripts with az commands within azure app service after deployment

Raviteja Boddu 0 Reputation points
2023-12-14T11:59:27.7933333+00:00

I have a .net application where I have some powershell scripts in which I gather details related to multiple app releases using az commands, but after deployment I am unable to execute them and I am getting error saying that az is not recognisable.
Does Azure App service not support azure cli. If not Help me with an alternative.

Developer technologies | ASP.NET | ASP.NET Core
Windows for business | Windows Server | User experience | PowerShell
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Anonymous
    2023-12-15T04:26:52.4166667+00:00

    Hi @Raviteja Boddu,

    Azure App Service does not support Azure CLI by default.

    The reason is that what can be done by Azure Cli can be done using RestAPI, so it is not necessary.

    But I tested it anyway, because of permission issues, Azure App Service Windows Paltform can't be installed, but Linux does (Install the Azure CLI on Linux). Here is the test result.

    User's image


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    Best regards,

    Jason


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.