删除订阅中Azure资源组的列表,而无需使用Azure CLI确认
我想在单个CLI命令中删除订阅中的所有资源组。我使用管道操作员删除所有资源组:(
get-azResourceGroup | remove-azResourceGroup)。
虽然Azure顺序删除组,但提示为每个资源组确认确认。是否有一种方法可以强制删除Azure CLI中的所有资源组,而不会遇到CLI的确认。
I want to delete all the resource groups in a subscription in a single cli command. I used pipeline operator to delete all the resource groups:
(Get-AzResourceGroup | Remove-AzResourceGroup).
While azure deletes the groups sequentially, it prompts for confirmation for each resource group. Is there a way to force delete all resource groups in Azure cli without encountering the confirmation from the CLI.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我们可以使用此Power Shell脚本在订阅中删除所有资源组。
删除所有名称与过滤器匹配的资源组
We can use this power shell script to delete all resource groups in a subscription.
Delete All resource groups whose names match with the filter
请使用
-force
参数删除资源组,而无需确认。从此-group-without-confircation“ rel =“ nofollow noreferrer”>
link
:Please use
-Force
parameter to remove resource group without confirmation.From this
link
: