2

Through the Azure portal I can disconnect my VNet integration, see below. I need to do this in a Powershell script, using the Az module. Is this possible?

enter image description here

The Gilbert Arenas Dagger
  • 12,071
  • 13
  • 66
  • 80

1 Answers1

6

Just use the command below, it works fine on my side.

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

Or

Remove-AzResource -ResourceId "/subscriptions/<subscription-id>/resourceGroups/<resource-group-name>/providers/Microsoft.Web/sites/<webapp-name>/config/virtualNetwork" -Force
Joy Wang
  • 39,905
  • 3
  • 30
  • 54