如何以编程方式在指定资源组中创建 Azure 自动化帐户?
How to programmatically create an Azure Automation Account in a specified Resource Group?
有没有办法在指定的(现有)资源组中创建新的 Azure 自动化帐户?
New-AzureAutomationAccount
cmdlet 允许创建新帐户,但它会强制创建以下列方式命名的新资源组 (OaasCS<subscription>-<location>
):
OaasCSb2f5e86d-f2a9-43cd-872a-22c9b428c2a5-South-Central-US
Azure PowerShell 文档 1.6.1 - 3.0.0 为 New-AzureAutomationAccount
cmdlet 提供了以下语法(表明这是不可能的):
New-AzureAutomationAccount [-Name] <String> [-Location] <String>
[-Profile <AzureSMProfile>] [<CommonParameters>]
另一方面this documentation page*(列出ResourceGroupName
参数):
New-AzureAutomationAccount [-ResourceGroupName] <String> [-Name] <String>
[-Location] <String> [-Plan <String> {Free | Basic} ] [-Profile <AzureProfile> ]
[-Tags <IDictionary> ] [ <CommonParameters>]
实际情况是 -ResourceGroupName
参数不被接受 (3.0.0):
New-AzureAutomationAccount -Name "ExampleAutomationAccount" -ResourceGroupName "ExampleResourceGroup" -Location $location
New-AzureAutomationAccount : A parameter cannot be found that matches parameter name 'ResourceGroupName'.
我正在寻找任何自动化解决方案,不仅是 PowerShell,但似乎只有 Azure 门户和 Windows PowerShell 支持自动化。
* 附带问题:后一个文档页面指的是什么?
New-AzureRmAutomationAccount -ResourceGroupName 'resourcegroupname' -Location westeurope -Name 'somename'
这是怎么回事 - 您正在尝试使用旧命令行开关创建一个自动化帐户(请注意我的 RM
)。截至 2016 年 3 月(无法确定),Azure 自动化不支持 ASM。
有没有办法在指定的(现有)资源组中创建新的 Azure 自动化帐户?
New-AzureAutomationAccount
cmdlet 允许创建新帐户,但它会强制创建以下列方式命名的新资源组 (OaasCS<subscription>-<location>
):
OaasCSb2f5e86d-f2a9-43cd-872a-22c9b428c2a5-South-Central-US
Azure PowerShell 文档 1.6.1 - 3.0.0 为 New-AzureAutomationAccount
cmdlet 提供了以下语法(表明这是不可能的):
New-AzureAutomationAccount [-Name] <String> [-Location] <String> [-Profile <AzureSMProfile>] [<CommonParameters>]
另一方面this documentation page*(列出ResourceGroupName
参数):
New-AzureAutomationAccount [-ResourceGroupName] <String> [-Name] <String> [-Location] <String> [-Plan <String> {Free | Basic} ] [-Profile <AzureProfile> ] [-Tags <IDictionary> ] [ <CommonParameters>]
实际情况是 -ResourceGroupName
参数不被接受 (3.0.0):
New-AzureAutomationAccount -Name "ExampleAutomationAccount" -ResourceGroupName "ExampleResourceGroup" -Location $location
New-AzureAutomationAccount : A parameter cannot be found that matches parameter name 'ResourceGroupName'.
我正在寻找任何自动化解决方案,不仅是 PowerShell,但似乎只有 Azure 门户和 Windows PowerShell 支持自动化。
* 附带问题:后一个文档页面指的是什么?
New-AzureRmAutomationAccount -ResourceGroupName 'resourcegroupname' -Location westeurope -Name 'somename'
这是怎么回事 - 您正在尝试使用旧命令行开关创建一个自动化帐户(请注意我的 RM
)。截至 2016 年 3 月(无法确定),Azure 自动化不支持 ASM。