我使用以下方法添加了SSL证书:

 New-AzureRmWebAppSSLBinding -WebAppName $app.SiteName -Thumbprint $new_thumbprint -Name $ssl_binding.Name -ResourceGroupName $app.ResourceGroup


但我想知道是否:-
是否可以使用Powershell更新SSL配置
powershell - 使用Powershell更新SSL配置-LMLPHP

我想做的是:
1)将“仅https”更改为“ ON”
2)最低TLS版本为'1.2'

使用PS

最佳答案

我设法弄清楚了。

# 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

09-25 18:01
查看更多