更新时间:2023-11-02 23:40:16
您将身份验证配置设置传输到Set-Webconfiguration,在您修改后提供适当的过滤器你的属性:
You pipe the authentication configuration settings to Set-Webconfiguration giving the appropriate filter after you modify your properties:
$config = (Get-WebConfiguration system.web/authentication 'IIS:\sites\Default Web Site')
$config.mode = "Forms"
$config | Set-WebConfiguration system.web/authentication
注意:在尝试之前备份您的配置。