Toggle IIS 7.5 Authentication “Anonymous Authentication” with Powershell 3.0?

后端 未结 1 451
被撕碎了的回忆
被撕碎了的回忆 2021-01-06 21:30

I\'d like to toggle the Anonymous Authentication (Enabled/Disabled) setting found in IIS Manager (7.5, Windows 7), Default Web Site / My Website - Authentication / Anonymous

1条回答
  •  栀梦
    栀梦 (楼主)
    2021-01-06 22:11

    Try the Set-WebConfigurationProperty cmdlet:

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

    0 讨论(0)
提交回复
热议问题