Configuring IIS sub-directories

I have been trying to figure out how to configured settings specific to a sub-directory of a web site in IIS. For instance I have an application that has one directory that requires Windows Authentication be enabled. There seems to be a reference to sub-directories in the xWebsiteDefaults resource, but I can’t seem to find any documentation on it. I haven’t really been able to find anything useful via Google either, though I have a hard time believing that I am the first person trying to do this. Any ideas?

xWebsite really just applies to the website object itself, rather than child objects. I’m not sure anyone’s written a resource to do what you’re asking - so you may indeed be the first ;).

Haha… perhaps I am. Guess I might have to write my own then.

The IIS cmdlets are a bit confusing. To turn on Windows auth using the cmdlet’s I would run…

Set-WebConfigurationProperty -Filter "/system.webserver/security/authentication/windowsauthentication" -Name 'enabled' -value 'True' -Location MySite/MyFolder

Simple enough, but using the get cmdlets Get-WebConfiguration and Get-WebConfigurationProperty I can’t see the “enabled” parameter. I can see that it is turned on via the GUI however. I kinda wish the configurations were text based in IIS like in other popular web servers.

A lot of the configurations are actually in one of the various XML files. You could certainly modify those manually.