I am trying to find an IIS7 site ID using site name using appcmd
or other utility but have not found any way to achieve it.
The following command returns site ID:
%systemroot%\system32\inetsrv\APPCMD list site <SiteName>
Example output:
SITE "Default Web Site" (id:1,bindings:http/*:80:default.local,state:Started)
SITE "My Site" (id:2,bindings:http/*:80:my.local,state:Started)