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?
Asked
Active
Viewed 1,346 times
1 Answers
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
-
thanks for the information. Here is a follow up question you almost surely know the answer to: https://superuser.com/q/1540059/1043540 – The Gilbert Arenas Dagger Apr 08 '20 at 17:24
-
@TheGilbertArenasDagger Yeah, but I don't play that forum, could you post the question in stackoverflow and give me the link? It looks suitable for the `azure-resource-manager` tag. – Joy Wang Apr 09 '20 at 01:09
-
sure thing. See here: https://stackoverflow.com/q/61112457/2860319 and thanks! – The Gilbert Arenas Dagger Apr 09 '20 at 01:16
-
@TheGilbertArenasDaggert Okay, I will post the answer later. – Joy Wang Apr 09 '20 at 01:22