IIS 8 and IIS 8.5 Create a Website from Command Line

Written by Allen White on. Posted in Server 2012, Web

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.

 

 
Allen White
at
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.

ITPS provides strategic IT consultancy, implementation, data centre provision and unified communications, as well as support services and workspace and disaster recovery. If you require a consultation then please contact me via the contacts section or direct on 07931222991, add me on linkedin. https://uk.linkedin.com/in/allenwhiteconsultant0001

Tags:

Leave a comment

Categories

(c) Techieshelp.com. Please be aware, all information is provided freely, any information used is done so at your risk and Techieshelp will not be held responsible for any issue that may occur.
!-- BuySellAds On-Site Shopping Cart -->