Azure power shell command to remove IP restriction

2019-09-20 00:13发布

I did my part of RnD and could not find Azure Powershell command remove IP restrictions on App service. Can someone help me out here plz.

1条回答
Viruses.
2楼-- · 2019-09-20 01:05

Try the command below, it works fine on my side.

$r = Get-AzureRmResource -ResourceGroupName "yourresourcegroup" -ResourceType Microsoft.Web/sites/config -ResourceName yourappservicename/web -ApiVersion 2016-08-01
$p = $r.Properties
$p.ipSecurityRestrictions = @()
Set-AzureRmResource -ResourceGroupName  "yourresourcegroup" -ResourceType Microsoft.Web/sites/config -ResourceName yourappservicename/web -ApiVersion 2016-08-01 -PropertyObject $p

enter image description here

查看更多
登录 后发表回答