Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to find IIS7 SiteID using site name on Windows 2008 using appcmd or other util?

Tags:

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.

like image 652
anil Avatar asked Sep 05 '12 09:09

anil


People also ask

How do I find the IIS site id?

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.

How do I get a list of IIS sites?

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.

How do I know if I have IIS on Windows Server 2008 r2?

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.

What is IIS in Windows Server 2008?

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®.


2 Answers

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) 
like image 125
anil Avatar answered Oct 22 '22 20:10

anil


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.

like image 31
Dave Markle Avatar answered Oct 22 '22 20:10

Dave Markle