[英]Toggle IIS 7.5 Authentication “Anonymous Authentication” with Powershell 3.0?
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 Authentication using Powershell. 我想切换IIS管理器(7.5,Windows 7),默认网站/我的网站 - 使用Powershell进行身份验证/匿名身份验证中的匿名身份验证(启用/禁用)设置。
I'm not looking for something that alters a web.config file, but does exactly what IIS Manager does. 我不是在寻找改变web.config文件的东西,但确实是IIS管理器所做的。
I've tried Set-WebConfiguration and Set-WebConfigurationProperty but not gotten close. 我已经尝试过Set-WebConfiguration和Set-WebConfigurationProperty,但没有得到关闭。
Can anyone provide an example? 谁能提供一个例子?
Try the Set-WebConfigurationProperty
cmdlet: 尝试
Set-WebConfigurationProperty
cmdlet:
Set-WebConfigurationProperty -Filter system.webServer/security/authentication/anonymousAuthentication `
-PSPath MACHINE/WEBROOT/APPHOST `
-Location 'Default Web Site' `
-Name Enabled `
-Value $true
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.