The following instructions describe how to install the Microsoft Web server "Internet Information Server" (IIS) in Windows Server.
Graphical Installation
The simplest way to install the Web server on Windows Server 2008 R2, is via the "Server Manager": Start -> All Programs -> Administrative Tools -> Server Manager
Click on "Roles" and then on "Add Roles".
Two roles are available for selection on a Windows Server 2008 Web Server: The Web server and the DNS Server -> Select the Web server and click on 'Next'.
The dialogue shows a minimal set of useful Web server role services, which can be extended e.g. to support ASP.NET websites. Some role services (such as ASP.NET, for example) require other components which can be installed at the same time.
Note: The individual role services can be added or removed at any time after the installation (via the Server Manager). On successful installation.
An http://localhost in the browser should display the default page.
Further information is available at: http://learn.iis.net/ -> "Installing and Configuring"
Command Line Installation
Alternatively, the IIS can be installed from the command line. Here is the command for installing all IIS features (Windows Server 2012 R2).
start /w pkgmgr /iu:IIS-WebServerRole;IIS-WebServer;IIS-CommonHttpFeatures;IIS-StaticContent;IIS-DefaultDocument;IIS-DirectoryBrowsing;IIS-HttpErrors;IIS-HttpRedirect;IIS-ApplicationDevelopment;IIS-ASPNET;IIS-NetFxExtensibility;IIS-ASP;IIS-CGI;IIS-ISAPIExtensions;IIS-ISAPIFilter;IIS-ServerSideIncludes;IIS-HealthAndDiagnostics;IIS-HttpLogging;IIS-LoggingLibraries;IIS-equestMonitor;IIS-HttpTracing;IIS-CustomLogging;IIS-ODBCLogging;IIS-Security;IIS-BasicAuthentication;IIS-WindowsAuthentication;IIS-DigestAuthentication;IIS-ClientCertificateMappingAuthentication;IIS-ISCertificateMappingAuthentication;IIS-URLAuthorization;IIS-RequestFiltering;IIS-IPSecurity;IIS-Performance;IIS-HttpCompressionStatic;IIS-HttpCompressionDynamic;IIS-WebServerManagementTools;IIS-ManagementConsole;IIS-ManagementScriptingTools;IIS-ManagementService;IIS-IIS6ManagementCompatibility;IIS-Metabase;IIS-WMICompatibility;IIS-LegacyScripts;IIS-LegacySnapIn;WAS-WindowsActivationService;WAS-ProcessModel;WAS-NetFxEnvironment;WAS-ConfigurationAPI;Microsoft-Windows-Web-Services-for-Management-IIS-Extension;IIS-WebDAV;MicrosoftWindowsPowerShellISE;NetFx3;IIS-HostableWebCore;IIS-FTPServer;IIS-FTPExtensibility;IIS-FTPSvc;BITSExtensions-Upload
For information on the installation status see the Event Log (Start -> Administrative Tools -> Event Log)
The IIS administration console can then be reached at (Start -> Administrative Tools -> Internet Information Services (IIS) Manager)
Further information can be found at http://learn.iis.net/page.aspx/132/install-iis-7-from-the-command-line/