Hi @KM ,
If you meant this module then I would recommend to try importing the module to Azure Automation account as explained here. Or else if you are looking for a way to call a PS script from a runbook then you can follow one of the below 3 approaches:
- Hybrid runbook worker i.e., Runbooks in Azure Automation might not have access to resources in other clouds or in your on-premises environment because they run on the Azure cloud platform. You can use the Hybrid Runbook Worker feature of Azure Automation to run runbooks directly on the machine that's hosting the role and against resources in the environment to manage those local resources. Runbooks are stored and managed in Azure Automation and then delivered to one or more assigned machines.
- Create an Azure storage account, container and upload a blob i.e., script (say xxxxxxxxxxxx.ps1 file with the content of your script) and then have below code in Azure Automation PowerShell runbook.
- Save a script (say xxxxxxxxxxxxxx.ps1) in your local machine (from where it executed without any issues) and have your script as content in that file and then have below code in Azure Automation PowerShell runbook.
For more information with regards to above mentioned 3 approaches, refer answer in this question.
If your use case or scenario is different and if you are looking for something else then please let me know with little more context.