首页 > 解决方案 > Azure - 在 Powershell 中断开 VNet 集成

问题描述

通过 Azure 门户,我可以断开我的 VNet 集成,见下文。我需要使用 Az 模块在 Powershell 脚本中执行此操作。这可能吗?

在此处输入图像描述

标签: azurepowershellazure-resource-managerazure-powershellaz

解决方案


只需使用下面的命令,它在我这边工作正常。

Remove-AzResource -ResourceGroupName "<resource-group-name>" -ResourceType "Microsoft.Web/sites/config" -ResourceName "<webapp-name>/virtualNetwork" -Force

或者

Remove-AzResource -ResourceId "/subscriptions/<subscription-id>/resourceGroups/<resource-group-name>/providers/Microsoft.Web/sites/<webapp-name>/config/virtualNetwork" -Force

推荐阅读