我使用以下内容添加了SSL certifcate: -
New-AzureRmWebAppSSLBinding -WebAppName $app.SiteName -Thumbprint $new_thumbprint -Name $ssl_binding.Name -ResourceGroupName $app.ResourceGroup
但我想知道是否: - 是否可以使用PowerShell更新SSL配置
我想做的是: -
1)仅更改' https'到' ON'
2)最低TLS版本为' 1.2'
使用PS
答案 0 :(得分:2)
我设法搞清楚了。
# SET staging
$PropertiesObject = @{
'httpsOnly' = 'true';
'minTlsVersion' = '1.2'
}
Set-AzureRmResource -PropertyObject $PropertiesObject -ResourceGroupName RG-AUTHSERVER -ResourceType Microsoft.Web/sites/slots -ResourceName "authserver-web/staging" -ApiVersion 2016-08-01 -Force
# SET staging
$PropertiesObject = @{
'minTlsVersion' = '1.2'
}
Set-AzureRmResource -PropertyObject $PropertiesObject -ResourceGroupName RG-AUTHSERVER -ResourceType Microsoft.Web/sites/slots/config -ResourceName "authserver-web/staging/web" -ApiVersion 2016-08-01 -Force