IIS - How to list all sites from the command line

You can use appcmd list sites to get a list of sites running under IIS.

Open a command prompt using Run as Administrator.

C:\WINDOWS\system32\inetsrv>appcmd list sites
 
SITE "Default Web Site" (id:1,bindings:http/*:80:,state:Started)
SITE "Site1" (id:2,bindings:http/*:80:site1.com,state:Started)
SITE "Site2" (id:3,bindings:http/*:80:site2.com,state:Started)

Note: appcmd will still work as a non-admin, but will display "state:Unknown".


Ads by Google


Ask a question, send a comment, or report a problem - click here to contact me.

© Richard McGrath