【问题标题】:How to edit overrideModeDefault in applicationhost.config for section using appcmd如何使用 appcmd 编辑 applicationhost.config 中的 overrideModeDefault 部分
【发布时间】:2015-03-12 16:40:37
【问题描述】:

我正在尝试使用 powershell 编辑 applicationhost.config。

我注意到在 IIS 中设置已更改,但实际的 applicationHost.config 没有覆盖 windowsAuthentication 的 overrideModeDefault。我需要将其设置为允许

<section name="windowsAuthentication" overrideModeDefault="Deny" />

C:\Windows\System32\inetsrv\appcmd.exe set config /section:windowsAuthentication /enabled:true /commit:apphost

无论如何,这可以使用 powershell appcmd 实现吗?

【问题讨论】:

  • appcmd.exe 和 Powershell 脚本是两个不同的东西。一种是可执行文件,一种是脚本环境。如果您可以在此密钥所在的 XML 中发布整个树,我可以为您提供帮助。

标签: powershell


【解决方案1】:

我设法解决了这个问题

unlock config C:\Windows\System32\inetsrv\appcmd.exe section:system.webserver/security/authentication/windowsauthentication

希望这对其他人有所帮助

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2010-10-17
    • 2021-08-02
    • 2014-01-23
    • 1970-01-01
    • 1970-01-01
    • 2021-10-04
    • 1970-01-01
    相关资源
    最近更新 更多