简体   繁体   中英

powershell display web app authentication

I have a script that pulls all the site and application information from IIS. I am able to get the site authentication(windows, basic, anonymous) using

Get-WebConfigurationProperty -filter system.webServer/security/authentication/anonymousAuthentication -Location "IIS:\\Sites\\$siteName" -name enabled.value

How can I get the authentication for the application under the sites?

I guess the code above was not working. Here is what I used to get the app authentication.

Get-WebConfigurationProperty -filter system.webServer/security/authentication/anonymousAuthentication -PSPath "IIS:\\Sites\\$siteName\\$appName" -name enabled.value

I repeat this for basic and windows authentication.

Thanks!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM