我想使用单个命令删除 Azure 中资源组中的所有公共(public) IP 地址,而不是逐个删除
最佳答案
您可以使用以下Powershell脚本来实现您的要求:
Get-AzureRmPublicIpAddress -ResourceGroupName <yourresourcegroupname> | Remove-AzureRmPublicIpAddress
此外,您还可以使用命令Force
来运行而不要求用户确认:
Get-AzureRmPublicIpAddress -ResourceGroupName <yourresourcegroupname> | Remove-AzureRmPublicIpAddress -Force
我在实验室进行了测试并成功了。
关于azure - 如何删除Azure中资源组中的所有公共(public)IP地址,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48074739/