Login :: Register
General Topics
HostedbyMaximumASP170x35
2005 IIS MVPs
Other IIS Sites
  How can I get a simple listing of the web sites on my Web Server? 

How can I get a simple listing of the web sites on my Web Server?

The small script below will show you a simple listing of the WWW sites on your server.

Sample output:

WWW Site: 1 - Default Web Site
WWW Site: 2 - Administration Web Site
WWW Site: 4 - IISFAQ
WWW Site: 7 - IIS5Bug

' Chris Crowe
' IISFAQ Web Site
' http://www.iisfaq.com
' September 24, 2000
' 
' Show ALL WWW Sites

Set IISOBJ = getObject("IIS://LocalHost/W3SVC")
For each Object in IISOBJ
	if (Object.Class = "IIsWebServer") then
		WScript.Echo "WWW Site: " & Object.Name & " - " & Object.ServerComment
	end if
next
 This site and its contents are Copyright 1999-2004 by IISFAQ Microsoft Corporation in no way endorses or is affiliated with IISFAQ