【发布时间】:2015-12-03 13:01:23
【问题描述】:
我使用 Get-AzureResourceGroupGalleryTemplate Azure PowerShell cmdlet 获取用于资源组部署的 Azure 资源组库模板,但在我将 PowerShell 升级到最新版本 (1.0 .1)。
这样做的替代方法是什么?
【问题讨论】:
标签: azure azure-powershell azure-resource-manager
我使用 Get-AzureResourceGroupGalleryTemplate Azure PowerShell cmdlet 获取用于资源组部署的 Azure 资源组库模板,但在我将 PowerShell 升级到最新版本 (1.0 .1)。
这样做的替代方法是什么?
【问题讨论】:
标签: azure azure-powershell azure-resource-manager
Get-AzureResourceGroupGalleryTemplate cmdlet 在最新的 Azure PowerShell 修订版 (1.0.1) 中已弃用。
有几种选择。
使用 Azure 快速入门模板
你可以去Azure Quickstart Templates。
此链接包含用于快速启动部署的最新 Azure 库模板列表,这些模板始终是最新的。
对 Microsoft Azure Gallery 端点的 GET 请求 REST API 调用
向 Microsoft Azure Gallery 端点发出 GET 请求:https://gallery.azure.com/Microsoft.Gallery/GalleryItems?api-version=2015-10-01
预期响应应为 JSON 格式,包含 Azure 库模板项列表。
下面显示了从 JSON 响应返回的图库模板之一。
"identity": "Microsoft.Windows10Enterprisex64.1.0.0", "publisher": "Microsoft", "publisherDisplayName": "Microsoft", "itemName": "Windows10Enterprisex64", "itemDisplayName": "Windows 10 Enterprise (x64)",...
希望这会有所帮助!
【讨论】: