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 easiest way is to load up IIS Manager and click on the "Sites" folder. There should be a column called "ID" in the list shown in the Features View pane, and that's your Site ID.
The Get-IISSite cmdlet gets information about Internet Information Services (IIS) web sites and their current status and other key information. If you a request a specific site or a comma delimited list of sites, only those whose names are passed as an argument are returned. Otherwise all the websites are returned.
Using Run CommandSelect windows +R key and type inetmgr and press OK. It will open the IIS manager window . In the same way go to Help ->About Internet Information Services and you will get the version installed on your computer.
IIS is Microsoft Web server role that is included with all versions of Microsoft's operating systems, and also powers Windows Azure Web Sites to provide robust cloud-based PaaS (Platform as a Service). Version 7.0 of IIS is included with Windows Server® 2008 and Windows Vista®.
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)
The easiest way is to load up IIS Manager and click on the "Sites" folder. There should be a column called "ID" in the list shown in the Features View pane, and that's your Site ID.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With