Get a list of sites hosted on a web server using commandline

There may be many sites hosted on a webserver(IIS) and we may want to retrieve those site names, easily and fastly. But it is not the same in all IIS versions. Let us have a look on how we can get the site names in IIS6 and IIS7.

IIS6 (Win Server 2003)

GUI:

IIS Export List

The same can be done through command line like:
iisweb /query >path\filename.txt
replace path with the pathname of the file to be created (Eg: C:\ProgramFiles\)

IIS7 (Win Server 2008)

appcmd list site > path\filename.txt

replace path with the pathname of the file to be created (Eg: C:\ProgramFiles\)

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s