我需要在Azure资源组之间复制标签。
这可能吗?
有什么想法吗?
答案 0 :(得分:1)
我会说一点Powershell!
如果尚未安装AZ模块,请先安装它(https://pub.dev/packages/plugins)。 然后:
$sourceTags = (Get-AzResourceGroup -ResourceGroupName SOURCEGROUP).Tags
Set-AzResourceGroup -ResourceGroupName DESTINATIONGROUP -Tags $tags
将Get / Set-AzResourceGroup替换为AzResource仅适用于任何其他资源类型。