Windows IIS - How to list all sites or applications

By kimot, 27 December, 2022

List of all sites :

C:\Windows\System32\inetsrv>appcmd list site
SITE "Default Web Site" (id:1,bindings:http/*:80:,https/*:443:,state:Started)
SITE "Dashboards" (id:2,bindings:http/*:8222:,state:Started)

List of all applications :

C:\Windows\System32\inetsrv>appcmd list vdir
VDIR "Default Web Site/" (physicalPath:%SystemDrive%\inetpub\wwwroot)
VDIR "Default Web Site/HelpSystems/" (physicalPath:C:\Program Files (x86)\Help Systems\Bentham\Bentham.Web\)
VDIR "Default Web Site/HelpSystems.Service/" (physicalPath:C:\Program Files (x86)\Help Systems\Bentham\Bentham.Service\)
VDIR "Default Web Site/Orchestrator/" (physicalPath:C:\Program Files (x86)\Help Systems\Orchestrator\Orchestrator Web\)
VDIR "Default Web Site/Reports/" (physicalPath:C:\Program Files (x86)\Help Systems\Reports\)
VDIR "Default Web Site/SharedObjects/" (physicalPath:C:\Program Files (x86)\Help Systems\SharedObjects\)
VDIR "Default Web Site/SmartConsole/" (physicalPath:C:\Program Files (x86)\Help Systems\SmartConsole WebClient\)
VDIR "Dashboards/" (physicalPath:C:\Program Files (x86)\Tango04\Dashboards\Web\)

These are another types you can mess with :

SITE      Administration of virtual sites
APP       Administration of applications
VDIR      Administration of virtual directories
APPPOOL   Administration of application pools
CONFIG    Administration of general configuration sections
WP        Administration of worker processes
REQUEST   Administration of HTTP requests
MODULE    Administration of server modules
BACKUP    Administration of server configuration backups
TRACE     Working with failed request trace logs
BINDING   Object for working with SSL bindings