Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Azure - Disconnect VNet Integration in Powershell

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

like image 625
The Gilbert Arenas Dagger Avatar asked Oct 28 '25 09:10

The Gilbert Arenas Dagger


1 Answers

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
like image 123
Joy Wang Avatar answered Oct 30 '25 00:10

Joy Wang