IT Tutorial

IIS 8 and IIS 8.5 Create a Website from Command Line

Very busy at the moment with a new job but I do have tons of articles to upload. Just a quick one to start with. In Internet Information Servers (IIS) 8.0 (Server 2012) and 8.5 (Server 2012R2), if you need to quickly make a website via command line the you can with the syntax below. First the syntax then the explanation, we first install IIS 8.0 or 8.5 from command line with all features.

Install-WindowsFeature Web-Server -IncludeManagementTools –IncludeAllSubFeature

Then create the site;

Appcmd add site /name:MyLovelyNewWebsite /id:10 /physcialPath: c:\MyLovelyWebsite /bindings:http:/*80:MyLovelyWebsite.com

The syntax above will create a new website called www.mylovelywebsite.com.

/Name: Is a friendly name to store in IIS so you can identify the website.

/ID: is as it says an ID number for the site.

/PhysicalPath: is the location where the website files will be stored.

/Bindings: relates the the protocol used, if you want to use non secure then its http and/*80 :and if you require a secure site then its https:/443: followed by the name of the website.

Simply upload the website to the physical folder with the index.htm or html and point your firewall port (80 or 80 and 443) and the website is ready.

 

Tags: IIS

Allen White

Allen is a Consultant for ITPS in the North East of England and holds the following accreditations. MCSA, MCSE, MCTS, MCITP, CCA, CCSP, VCP 4,5 and HP ASE, AIS - Network Infrastructure.

Leave a comment

Categories

Vote!

What Web Browser Do You Use?

View Results

Loading ... Loading ...

Vote!

What do you prefer..VMware or Hyper-V?

View Results

Loading ... Loading ...