MicrosoftWeb HostingWindows Server 2016Windows Server 2019Windows Server 2022Windows Server 2025

IIS Server Installation on Windows Server

Install IIS Server On Windows Server 2022/25 Step-by-Step

IIS Server Installation for Deploying Website on Windows Server 2022/25

If you are planning IIS Installation to host your website on Your Windows Web Server.

This article helps you install IIS on Windows Server 2022/25 and host your websites.

In this article, we will see how to install IIS with a default cmdlet and custom configuration as well.

We will see both PowerShell and Graphical methods to install the IIS Web server.

So, let’s begin.

 

What is Internet Information Service (IIS)

IIS is a Windows Server System service that helps you host any type of Website on your Server.

It is a flexible and secure web server from Microsoft that can host multiple platform websites such as Asp.net, HTML, PHP, WordPress, etc.

You can implement your webserver in-house with IIS to serve your fully functional website.

It is secure, reliable, scalable, and highly available if configured in a planned way.

 

How to Install IIS on Windows Server

Here we are installing IIS on Windows Server 2025, connected to the internet.

To install IIS on Windows Server 2022/25 follow the steps below

Open Server Manager and click on Add Role & Features

Click on Next and select Role-based or Feature-based Installation and proceed with Next.

Now select your server name and click next.

You will see the option to choose the Server Roles, here you have to check the Web Server (IIS) and proceed with next.

iis installation

After proceeding to the next a popup will appear to include management tools for IIS

Just click on Add Features

add iis features

Once you add the features, click on next and next thrice to choose the role services

install iis role services

Therefore, If you need any specific service to be installed you can select from this screen option such as dynamic content compression, and click on next.

Once you click on next a final prompt for the confirmation will be there to install the IIS.

Check and confirm the role and features you selected and click on Install

installing IIS

It will take a bit of time to get installed, close the wizard once the installation is done.

how to install iis

Though it is not necessary to restart the server after IIS Installation, it is good to restart whenever you install something new to the system.

Now IIS Service has been successfully installed.

 

Install IIS Web Server with PowerShell

To install IIS via PowerShell, you must open the PowerShell as an elevated mode.

Run the following command to install the default IIS Web Server with Management tools.

Install-WindowsFeature Web-Server -IncludeManagementTools

installing iis with powershell

If you want to check the features installed with the default above cmdlet.

You can run the following cmdlet

Get-WindowsFeature web* | Where InstallState -Eq Installed

The above cmdlet will display the installed features as shown in the image below

feature installed for web server iis

However, if you want to install the IIS in a custom way, the below cmdlet will help you to install the IIS web Sever role and features similar to the Plesk (IIS Control Panel)

Add-WindowsFeature Web-Server, Web-WebServer, Web-Common-Http, Web-Default-Doc, Web-Dir-Browsing, Web-Http-Errors, Web-Static-Content, Web-Http-Redirect, Web-Health, Web-Http-Logging, Web-Http-Tracing, Web-Performance, Web-Stat-Compression, Web-Security, Web-Filtering, Web-Basic-Auth, Web-IP-Security, Web-Url-Auth, Web-Windows-Auth, Web-App-Dev, Web-Net-Ext45, Web-ASP, Web-Asp-Net45, Web-CGI, Web-ISAPI-Ext, Web-ISAPI-Filter, Web-WebSockets, Web-Ftp-Server, Web-Ftp-Service, Web-Mgmt-Tools, Web-Mgmt-Console, Web-Scripting-Tools

custom installation of iis

Therefore, to remove these roles you can run the following cmdlet

Remove-WindowsFeature Web-Server, Web-WebServer, Web-Common-Http, Web-Default-Doc, Web-Dir-Browsing, Web-Http-Errors, Web-Static-Content, Web-Http-Redirect, Web-Health, Web-Http-Logging, Web-Http-Tracing, Web-Performance, Web-Stat-Compression, Web-Security, Web-Filtering, Web-Basic-Auth, Web-IP-Security, Web-Url-Auth, Web-Windows-Auth, Web-App-Dev, Web-Net-Ext45, Web-ASP, Web-Asp-Net45, Web-CGI, Web-ISAPI-Ext, Web-ISAPI-Filter, Web-WebSockets, Web-Ftp-Server, Web-Ftp-Service, Web-Mgmt-Tools, Web-Mgmt-Console, Web-Scripting-Tools

 

Port Setting For IIS Web Server

Whenever you install an IIS web server on your system.

It is necessary to check that, you can browse on ports 80 and 443 for a secure connection on SSL

Also, make sure to install an SSL Certificate for your IIS Websites.

However, you can check your Windows firewall for the ports, if they are not opened, you can run the following cmdlet to open ports 80 and 443

For Outbound rule port 80

New-NetFireWallRule -DisplayName "Port 80" -Direction Outbound -LocalPort 80 -Protocol TCP -Action Allow

To Allow Inbound rule on port 80

New-NetFireWallRule -DisplayName "Port 80" -Direction Inbound -LocalPort 80 -Protocol TCP -Action Allow

For Inbound Allow rule port 443

New-NetFireWallRule -DisplayName "Port 443" -Direction Inbound -LocalPort 443 -Protocol TCP -Action Allow

Once you enable the above port, your website will start listening to the port 80 and 443.

Note: If you want to access the website from outside, you have to forward the port 80,443,21 to your IIS Web Server IP

Port 21 is for FTP, if you are planning to publish your FTP on your Web server, you have to open port 21 as well.

If You want to configure FTP as well, see the article for Publishing FTP on Windows Web Server.

Also, make sure to test the connection after you allow the ports.

To make a successful test connection for ports 21,80 and 443, run the following cmdlets.

Test-NetConnection -port 21
Test-NetConnection -port 80
Test-NetConnection -port 443

As in my case I opened 80 and 443 but not port 21, so the below screen shows the successful connection on ports 80 and 443 but false for port 21

So, choose your selection according to your needs.

testing port connection

Moreover, if you want to enable the core IIS Service to manage your IIS Server from another server.

you can enable it by running the following cmdlet

Install-windowsFeature Web-Mgmt-Service

 

Conclusion

We learned how to install the IIS Server on Windows Server 2022/25.

All the steps are the same if you install it on server 2022 or server 2025.

Therefore, we also explore the different methods of installing IIS with graphical and via PowerShell.

Along with this we also enabled the necessary ports and tested the connection.

If you have any query related to this post feel free to contact us.

Watch the video below for IIS Server Installation on your Windows Server 2019/22/25

YouTube video

Vikas Jakhmola

Vikas Jakhmola, the founder of Techijack, with over 15+ years of experience in the IT industry.

Related Articles

Back to top button