azure - 如何删除Azure中资源组中的所有公共(public)IP地址

标签 azure azure-powershell azure-cli

我想使用单个命令删除 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/

相关文章:

azure - 使用 Az CLI 创建新的 Azure 容器实例时,无法从私有(private) Azure 容器注册表中提取镜像

c# - 将 ssl 添加到 webapi...也添加到客户端?

Azure powershell Get-AzAutomationWebhook : Parameter set cannot be resolved

azure - 将自定义镜像从 Azure 中的一个区域复制到另一个区域时出现错误

azure - 用于 Azure CLI 的 AWS IAM 用户的 Azure 等效项是什么

azure - 如何访问/将模块输出转换到二头肌中的特定对象?

azure - Azure IoT Edge 模块的安装路径

azure - Powershell Connect-AzureAD 错误 "accessing_ws_metadata_exchange_failed"

powershell - Azure PowerShell - 如何创建队列(如果不存在)

Azure Web应用程序克隆 powershell 脚本不起作用