Azure:删除所有标签

发布于 2025-02-13 13:14:25 字数 181 浏览 1 评论 0原文

我有脚本可以删除所有标签。 我尚未获得标签:

get-aztag

名称count


displayName 2
应用1
部门1
env 1
所有者1

我找不到附有哪个资源。

什么主意吗?

谢谢

I have script to delete all Tags.
I get Tags yet:

Get-AzTag

Name Count


displayName 2
App 1
Department 1
Env 1
Owner 1

I can't find which resource is attached.

Get-AzResource

Any idea?

thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

暗恋未遂 2025-02-20 13:14:25

谢谢 @gill-bates,根据 so-thread 它说,

无法删除已经与资源或资源组关联的标签或值。在使用remove-aztag之前,请使用set-azResourceGroup cmdlet的标签参数从资源或资源组删除标签或值。

“在此处输入图像说明”

Update-AzTag -ResourceId xyz-Tag $tags -Operation Delete

xyz是资源ID

输出:
“在此处输入映像”

从:

Thanks @Gill-Bates, According to SO-thread it says,

A tag or value that is already associated with a resource or resource group cannot be removed. Before using Remove-AzTag, use the Tag parameter of the Set-AzResourceGroup cmdlet to delete the tag or values from the resource or resource group.

enter image description here

enter image description here

Update-AzTag -ResourceId xyz-Tag $tags -Operation Delete

xyz is resource id

Output:
enter image description here

References taken from:

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文