List All Hosted Websites from the Command Line in IIS

How can we list the entire hosted website from the command line in IIS?

+8
source share
2 answers

You may need to run this as an administrator.

appcmd list site 

Directly from http://technet.microsoft.com/en-us/library/cc771280(v=ws.10).aspx

+9
source

As @WolfyUK already mentioned, you may need to run a command from the inetsrv directory.

64 bit:

 %windir%\system32\inetsrv\appcmd.exe list site 

32 bit:

 %windir%\syswow64\inetsrv\appcmd.exe list site 

The list site command will list all sites, but you can also:

List of individual sites by name:

 ...\appcmd.exe list site /name:"<site_name>" 

List the individual site by meta-identifier (site identifier No.):

 ...\appcmd.exe list site /id:<site_number> 
0
source

All Articles