Search code examples
azurepowershellapipowershell-3.0azure-automation

Get Custom Module details from Azure Automation


I have created custom module and uploaded it in Azure Automation module section. Now when I try to run the command to fetch the list of modules, it is not showing over there. I have used PowerShell command and REST API also but it is giving me value of Default modules only. Is there any way I can get the details of custom module?

I have tried below 2 ways-

  1. Powershell - https://learn.microsoft.com/en-us/powershell/module/az.automation/get-azautomationmodule?view=azps-7.0.0

  2. API

Please help.


Solution

  • Here is the one of workaround that i was able to fetch the custom module that i have added to Azure Automation using Powershell

    Run the following cmd to get all the modules default and custom

    Get-AzAutomationModule -AutomationAccountName "<name>" -ResourceGroupName "<name>"
    

    enter image description here

    To Fetch the list of custom modules run the below cmd

    Get-AzAutomationModule -AutomationAccountName "<name>" -Name "MicrosoftTeams" -ResourceGroupName "<name>"
    

    enter image description here

    Also can able to see it from azure portal itself. Also make sure that you have added the custom module with some functionality .