Loop Thru All the Sites on an IIS Server
1: loop thru all the sites on an IIS server."
2: Dim IISOBJ, WebSite
3: Set IISOBJ = GetObject("IIS://Localhost/W3SVC")
4: For each WebSite in IISOBJ
5: if (WebSite.Class = "IIsWebServer") then
6: MsgBox WebSite.ServerComment + "("_
7: + GetPath (WebSite) + ")"
8: end if
9: Next
10:
11: Function GetPath (WebSite)
12: Dim Root, NewADSPath, Path
13: Set Root = GetObject(WebSite.ADSPath & "/ROOT")
14: GetPath = lcase(Root.Path)
15: End Function
16:
17:
Posted by sachauncey at June 27, 2003 06:39 PM