0
votes

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?

1

1 Answers

0
votes

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!