【问题标题】:Toggle IIS 7.5 Authentication "Anonymous Authentication" with Powershell 3.0?使用 Powershell 3.0 切换 IIS 7.5 身份验证“匿名身份验证”?
【发布时间】:2013-08-08 21:07:31
【问题描述】:

我想切换 IIS 管理器(7.5、Windows 7)、默认网站/我的网站 - 身份验证/使用 Powershell 的匿名身份验证中的匿名身份验证(启用/禁用)设置。

我不是在寻找改变 web.config 文件的东西,而是完全按照 IIS 管理器所做的。

我尝试过 Set-WebConfiguration 和 Set-WebConfigurationProperty,但没有接近。

谁能举个例子?

【问题讨论】:

    标签: authentication iis powershell


    【解决方案1】:

    试试Set-WebConfigurationProperty cmdlet:

    Set-WebConfigurationProperty -Filter system.webServer/security/authentication/anonymousAuthentication `
                                  -PSPath MACHINE/WEBROOT/APPHOST `
                                  -Location 'Default Web Site' `
                                  -Name Enabled `
                                  -Value $true
    

    【讨论】:

    • 完美运行。通过我的是-PSPath。非常感谢。
    • @Shay 你能告诉我如何使用电源外壳修改“功能委派”吗?我想将“身份验证 - 匿名+”更改为读/写。谢谢。
    猜你喜欢
    • 1970-01-01
    • 2019-01-09
    • 2020-12-21
    • 1970-01-01
    • 2012-10-14
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多