Installing Web Server (IIS) Role using PowerShell on Windows Server

Simple steps to Install Web Server (IIS) Role using PowerShell on Windows Server

As now a days we are more working on Automation, we want everything on to be in a script or commands.

So below are the steps which we can use it to automate the Web Server (IIS) installation.

First, you can check is Web Server (IIS) is configured or not by going to Server Manager as shown below.

As its not installed, we will be configuring it through PowerShell scripts. With easy and simple steps

In PowerShell we get below options for “Install-windowsfeature”, this is the command we are using to get the IIS (Web Server) Role installed.

You can also refer Microsoft website for more details on this command.

We can use the below command to configure the Web server, we are using the options as per our requirements.

Install-WindowsFeature -Name Web-Mgmt-Tools,Web-App-Dev,Web-Security,Web-Performance, Web-Webserver,Web-Application-Proxy -IncludeAllSubFeature

While executing the command, it shows the progress of execution.

Once the installation is completed, it will shows the success results.

The Options which we get for this command, based on the usage you can provide them with the ‘,’(comma).

Below are the list of options and the Roles service which you can provide based on the usage.

Roles Service Name
Web Server Web-WebServer
Common HTTP Features Web-Common-Http
Default Document Web-Default-Doc
Directory Browsing Web-Dir-Browsing
HTTP Errors Web-Http-Errors
Static Content Web-Static-Content
HTTP Redirection Web-Http-Redirect
WebDAV Publishing Web-DAV-Publishing
Health and Diagnostics Web-Health
HTTP Logging Web-Http-Logging
Custom Logging Web-Custom-Logging
Logging Tools Web-Log-Libraries
ODBC Logging Web-ODBC-Logging
Request Monitor Web-Request-Monitor
Tracing Web-Http-Tracing
Performance Web-Performance
Static Content Compression Web-Stat-Compression
Dynamic Content Compression Web-Dyn-Compression
Security Web-Security
Request Filtering Web-Filtering
Basic Authentication Web-Basic-Auth
Centralized SSL Certificate Support Web-CertProvider
Client Certificate Mapping Authentication Web-Client-Auth
Digest Authentication Web-Digest-Auth
IIS Client Certificate Mapping Authentication Web-Cert-Auth
IP and Domain Restrictions Web-IP-Security
URL Authorization Web-Url-Auth
Windows Authentication Web-Windows-Auth
Application Development Web-App-Dev
.NET Extensibility 3.5 Web-Net-Ext
.NET Extensibility 4.6 Web-Net-Ext45
Application Initialization Web-AppInit
ASP.NET 3.5 Web-Asp-Net
ASP.NET 4.6 Web-Asp-Net45
ISAPI Extensions Web-ISAPI-Ext
ISAPI Filters Web-ISAPI-Filter
Server Side Includes Web-Includes
WebSocket Protocol Web-WebSockets
FTP Server Web-Ftp-Server
FTP Service Web-Ftp-Service
FTP Extensibility Web-Ftp-Ext
Management Tools Web-Mgmt-Tools
IIS 6 Management Compatibility Web-Mgmt-Compat
IIS 6 Metabase Compatibility Web-Metabase
IIS 6 Scripting Tools Web-Lgcy-Scripting
IIS 6 WMI Compatibility Web-WMI
IIS Management Scripts and Tools Web-Scripting-Tools
Management Service Web-Mgmt-Service

After Installation, if you check the Server Manager Dashboard you can see IIS

If you are facing any issue, comment them below. We will help you to resolve them ASAP.

You Can also refer Configuring IIS Server on Windows Server 2016 Datacenter – GUI

To Automate the website creation and Certificate Configuration, you can refer below sites

Creating Websites using PowerShell scripts

Using PowerShell, Installing the Certificate for the Website and providing the required permission to access the website

3 Replies to “Installing Web Server (IIS) Role using PowerShell on Windows Server”

  1. It’s not my first time tto go to see this weeb page,
    i am visiting this web site very often and take good facts from here.

  2. I’ve been surfing on-line greater than 3 hours these days, but I by no means found any fascinating article like yours. It is lovely value sufficient for me. In my opinion, if all site owners and bloggers made good content material as you probably did, the web can be much more useful than ever before.

Leave a Reply

Your email address will not be published. Required fields are marked *