Stri
Stri

Reputation: 13

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?

Upvotes: 0

Views: 912

Answers (1)

Stri
Stri

Reputation: 13

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!

Upvotes: 0

Related Questions