I am trying to use Powershell to set IP security restrictions. My syntax does not return any errors, but the settings do not change. The ipSecurityRestrictions property is a hash table.
$r = Get-AzureRmResource -ResourceGroupName *resource-group-name* -ResourceType Microsoft.Web/sites/config -ResourceName resourcename/web -ApiVersion 2016-08-01 $p = $r.Properties $p.ipSecurityRestrictions = @{ ipAddress = "0.0.0.0"; subnetMask = "0.0.0.0" } Set-AzureRmResource -ResourceGroupName *resource-group-name* -ResourceType Microsoft.Web/sites/config -ResourceName resourcename/web -ApiVersion 2016-08-01 -PropertyObject $p
This is not a problem, and there are no errors. To change a property that is not a hash table, such as phpVersion, the following code works:
$p.phpVersion = "7.0"
Has anyone successfully installed ipSecurityRestrictions using this method?
source share