我知道您可以通过以下命令为IIS网站设置:
Set-WebConfigurationProperty -filter "/system.webServer/security/authentication/windowsAuthentication" -name enabled -value true -PSPath "IIS:\" -location $siteName
但我希望将其设置为网站内的应用程序。例如,我有一个名为“MySite”的IIS网站,在其中有两个应用程序。我想为其中一个启用Windows身份验证,而另一个则不启用。因此,在站点级别启用将同时启用两者,这正是我不想要的。