IIS configuration

Kandel1 1 Reputation point
2022-09-13T23:43:49.703+00:00

This is for the IIS configuration

In IIS under Sites > Default Website in IIS, I have site called 'web1' and there are lot of folders.

I want to check each folders/subfolders to see if they are configured for Windows Authentication or Anonymous

I am looking for a command line to list folders/subfolders and their authentication (Windows Authentication or Anonymous)

Thanks

Windows development Internet Information Services
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Yurong Dai-MSFT 2,846 Reputation points Microsoft External Staff
    2022-09-14T03:18:39.023+00:00

    Hi @Kandel1 ,

    Try the following commands:

    Get-WebConfigurationProperty -pspath 'MACHINE/WEBROOT/APPHOST' -location 'Default Web Site' -filter "system.webServer/security/authentication/anonymousAuthentication" -name "enabled" | select value  
    

    Returns true if anonymous authentication is enabled. False if it isn't. Windows Authentication as well.

    240825-image.png


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the email notification for this thread.

    Best regards,
    Yurong Dai

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.