Hi @Eric Kyaw ,
Thanks for your patience.
Based on this response from the engineering team and due to the current sandbox security restriction imposed on Azure Web sites/web job, running Azure PowerShell command in Azure Web Job is currently not supported. The product group is aware of this limitation and working to address this, there is no ETA we can share at this point. You can track the work on this repo.
We apologize for any frustration this limitation may cause. You may try looking into PowerShell runbook in Azure Automation to see if it fits your scenario. PowerShell runbooks are based on Windows PowerShell. You directly edit the code of the runbook using the text editor in the Azure portal. Please see this tutorial for more information on PowerShell runbook.
Hope that helps. Let us know if you have further questions
Best,
Grace