【问题标题】:Get Custom Module details from Azure Automation从 Azure 自动化获取自定义模块详细信息
【发布时间】:2022-01-22 03:16:21
【问题描述】:

我已创建自定义模块并将其上传到 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

请帮忙。

【问题讨论】:

    标签: azure powershell api powershell-3.0 azure-automation


    【解决方案1】:

    这是我能够使用 Powershell 获取已添加到 Azure 自动化的自定义模块的一种解决方法

    运行以下cmd获取所有模块defaultcustom

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

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

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

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

    【讨论】:

      猜你喜欢
      • 2023-04-09
      • 1970-01-01
      • 2012-05-23
      • 1970-01-01
      • 2013-04-12
      • 2016-08-14
      • 1970-01-01
      • 2022-08-19
      • 2015-12-10
      相关资源
      最近更新 更多