You can add the custom modules to your Azure Functions App using the FTP. Essentially, we need to configure a service account using the Azure Portal that will have access to the Azure Function App FTP. Now, from the FTP, we can add the Custom modules to the Azure Functions App in the path \Site\wwwroot\[Functionname].
Table of Contents
How To Add Custom Modules to Azure Functions App
Another option for using external PowerShell Modules inside your Azure Function App is to utilize Advanced Tools (Kudu) for this purpose. This is one of the best options to use in this case. Let’s follow the steps below.
Add Custom Modules to Azure Functions App using Kudu
Navigate to your Azure Function app that you have created to use with PowerShell. Click on the Advanced Tools link under the Development Tools section.

Now, click on the Go button on the Advanced Tools window.

Select the CMD option from the Debug console drop-down in the top navigation window.

Navigate to the subfolder site/wwwroot/{yourFunctionName}. You can see there that two default files run.ps1 and function.json
Click on the Home Button –> Site –> wwroot –> Click on your Function Name

Now click on the + button –> New Folder and create a folder with the module name like below


Now you can drag and drop the files from your local path to this folder

Now, copy the complete path from the CMD window and keep it, as we need to add that in our Import statement

For me, the path is D:\home\site\wwwroot\MyHttpPowerShellFunction\azurerm
Now you need to import the PowerShell module in the Run.ps1 file like below
Import-Module “D:\home\site\wwwroot\MyHttpPowerShellFunction\azurerm\AzureRM.AnalysisServices.psd1”
This is one of the best options to Add Custom Modules In The Azure Functions App.
FAQs
How To Load Custom Modules From The Azure Functions App
Once you upload the custom module to the Azure Functions App, import it in the Run section. ps1 file on the Function windows as shown above. The import statement will be like below
Import-Module home\Site\wwwroot\MyHTTPPowerShellFunction\[YourModuleFolderName]\filename.psd1Wrapping Up
In this article, we discussed how to add custom modules to an Azure Functions App. Thanks for reading this article !!!
You may also like the following articles.
- Create a Function App in Azure Portal
- Create And Consume Azure Function From ASP.NET Core
- How To Store Logs in Azure Functions Which Can Be Accessed Later

I am Rajkishore, and I am a Microsoft Certified IT Consultant. I have over 14 years of experience in Microsoft Azure and AWS, with good experience in Azure Functions, Storage, Virtual Machines, Logic Apps, PowerShell Commands, CLI Commands, Machine Learning, AI, Azure Cognitive Services, DevOps, etc. Not only that, I do have good real-time experience in designing and developing cloud-native data integrations on Azure or AWS, etc. I hope you will learn from these practical Azure tutorials. Read more.
