You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何通过PowerShell在IIS服务器级设置Forms Authentication功能委派为只读?

在IIS服务器级别通过PowerShell设置Forms Authentication为只读(功能委派)

要实现服务器级别将Forms Authentication的功能委派设为“只读”,只需将对应配置节点的overrideMode值设为Deny(拒绝站点级覆盖)——你之前的命令错误地设置成了Allow(允许覆盖),正确命令如下:

Set-WebConfiguration -Filter "/system.webServer/security/authentication/formsAuthentication" -Metadata overrideMode -Value Deny -PSPath "IIS:\"

验证设置是否生效

执行以下命令查看当前的overrideMode值,确认是否已设为Deny:

Get-WebConfiguration -Filter "/system.webServer/security/authentication/formsAuthentication" -Metadata overrideMode -PSPath "IIS:\"

注意:执行上述PowerShell命令需要以管理员权限运行,否则会因权限不足操作失败。

内容的提问来源于stack exchange,提问作者Vivek Pandey

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.26 10:34:54