10/20/2009 2:55:08 PM
I needed to know all of the websites that were set up in IIS on our web server. I found this very helpful article from David Wang about enumerating all of the websites using VBScript. The script will list the sites on the local IIS or a remote server if the servername is passed in to the script.
I had too many sites to review inside the console window, so I updated the script to write the output to a text file. It worked out well and I think it could be a handy tool to have around..
*Note: I ran this under IIS 6 and it may work with IIS 7 but I have not had a chance to test it.
The script is attached below and can be executed with the following command:
cscript IIS6_SiteList.vbs
Attachments:
IIS6_SiteList.vbs
Tags:IIS VBScript 6ed39b66-9327-43ef-ac28-faae513cd793