Reputation: 40573
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
Upvotes: 1
Views: 2355
Reputation: 9088
This works for me on XP / IIS5.
adsutil.vbs GET W3SVC/1/ROOT/TestMPIService/KeyType
KeyType : (STRING) "IIsWebVirtualDir"
adsutil.vbs GET W3SVC/1/ROOT/aspnet_client/KeyType
KeyType : (STRING) "IIsWebDirectory"
More about the adsutil here: http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/d3df4bc9-0954-459a-b5e6-7a8bc462960c.mspx?mfr=true
Upvotes: 0