从 Azure 自动化获取自定义模块详细信息

Get Custom Module details from Azure Automation

我已经创建了自定义模块并将其上传到 Azure 自动化模块部分。现在,当我尝试使用 运行 命令获取模块列表时,它没有显示在那里。我也使用过 PowerShell 命令和 REST API,但它只给我默认模块的值。有什么办法可以得到自定义模块的详细信息吗?

下面两种方法我都试过了-

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

  2. API

请帮忙。

这是我能够使用 Powershell

获取已添加到 Azure Automation 的自定义模块的解决方法之一

运行下面cmd得到所有模块defaultcustom

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

获取自定义模块列表 运行 以下 cmd

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

也可以从 Azure 门户本身看到它。还要确保您已添加具有某些功能的自定义模块。