Hello Frank,
You should consider using Azure Functions with PowerShell:
https://learn.microsoft.com/en-us/azure/azure-functions/functions-reference-powershell?tabs=portal
If this is helpful please accept answer.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
We are running an asp.net core API project in Azure app service, one of our new features needs to install a PowerShell module ExchangeOnlineManagement
. What is the best approach to install ps module in the Azure app service?
Hello Frank,
You should consider using Azure Functions with PowerShell:
https://learn.microsoft.com/en-us/azure/azure-functions/functions-reference-powershell?tabs=portal
If this is helpful please accept answer.
Hi @Frank Zhang (BEYONDSOFT CONSULTING INC) ,
you can use the Kudu console to install a PowerShell module in an Azure App Service
-First open the Kudu console for your App Service. You can do this by navigating to your App Service in the Azure portal, clicking on "Advanced Tools" in the left-hand menu, and then clicking on "Go" under "Kudu".
-Once you are in the Kudu console, click on "Debug Console" in the left-hand menu and select "PowerShell".
-In the PowerShell console, run the following command to install the ExchangeOnlineManagement module:
Install-Module ExchangeOnlineManagement
-Wait for the module to finish installing. Once it's done, you can close the PowerShell console.
In your ASP.NET Core API project, you can use the Import-Module cmdlet to import the ExchangeOnlineManagement module and use its cmdlets.
The current version of Azure PowerShell is 9.7.1. For information about the latest release, see the release notes. PowerShell version 7 or higher is the recommended version of PowerShell for use with the Az PowerShell module on all platforms including Windows, macOS, and Linux.
Hope that helps.
-Grace