I am trying to find a way to write a script which will check if a IIS 6 directory is a virtual directory or not (see image below – I would like to see if TestMPIService is a virtual dir or not).
I tried with Powershell and WMI, but I am unable to find that information anywhere. Anybody has an idea how to do such thing?
alt text http://img518.imageshack.us/img518/7484/capturehwjvbx.png
Looks like you can use System.DirectoryServices.DirectoryEntries to read the IIS metabase.
See here and here.
There is also a metabase.xml you can look at if you use IIS6.