You can add the custom modules to your Azure Functions App using the FTP. So basically what we need to do is, We will have to configure one service account using the Azure Portal that will have access to the Azure Function App FTP. Now from the FTP we can able to add the 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 to use external PowerShell Modules inside of your Azure Function App is to use Advanced tools (Kudu) for this purpose. This is one of the best options to use in this case. Let’s follow the below steps
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 DropDown from the top navigation window.

Navigate to the subfolder site/wwwroot/{yourFunctionName}. You can able to 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 –> NewFolder and create a folder with the module name like below


Now you can simply 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 in the Azure Functions App, then import the custom module in the Run. ps1 file on the Function windows as shown above. The import statement will be like below
Import-Module home\Site\wwwroot\MyHTTPPowerShellFunction\[YourModuleFolderName]\filename.psd1
Wrapping Up
In this article, we discussed, how to add custom modules to Azure Functions App. Thanks for reading this article !!!

I am Rajkishore, and I have over 14 years of experience in Microsoft Azure and AWS, with good experience in Azure Functions, Storage, Virtual Machine, 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.