DEV Community

Cover image for ๐ŸŒ Deploying a Web Server VM and Installing IIS on Windows
 Ganiyat Olagoke Adebayo
Ganiyat Olagoke Adebayo

Posted on

๐ŸŒ Deploying a Web Server VM and Installing IIS on Windows

When building or testing web applications on Azure, creating a Windows Server VM and installing Internet Information Services (IIS) is a fundamental skill. IIS is Microsoftโ€™s web server platform used for hosting websites and web applications.

This guide walks you through creating a Windows VM, connecting using RDP, installing IIS, and verifying your setup.

Create a Web Server VM in Azure

  • Sign in to the Azure Portal
  • Navigate to Virtual Machines โ†’ Create


-Select: Image: Windows Server (e.g., Windows Server 2019 Datacenter)

  • Size: Standard B1s or higher
  • Choose Authentication type: Password or Azure AD login

  • In the Networking tab:Ensure RDP port 3389 is open for remote access
  • Ensure RDP port 3389 is open for remote access

  • Disable Monitoring

  • Click Review + Create, then Create


๐Ÿ“Œ Tip:
Use an existing resource group if working within a structured environment.

Connect to the Virtual Machine(VM) Using RDP

  • Once deployment completes:

  • Go to the VM Overview page

  • Increase idle time

  • Click Connect โ†’ RDP

  • Download the .rdp file

  • Open it and click Connect
  • Enter your Admin username and password

  • You now have full remote access to the VM.

Open PowerShell as Administrator

Inside the VM:

  • Click Start Menu
  • Search Windows PowerShell

  • Right-click โ†’ Run as administrator

This gives you the privileges required to install server roles.

Install IIS Web Server

  • Run the command below in PowerShell:Install-WindowsFeature -name Web-Server -IncludeManagementTools

๐Ÿ”น This installs IIS, the web server software for hosting websites.

  • Optional: Install Specific IIS Features If you need additional role services, install them with: Install-WindowsFeature -name Web-Server, Web-WebServer, Web-Common-Http, Web-Default-Doc, Web-Dir-Browsing, Web-Http-Errors, Web-Static-Content, Web-Health, Web-Http-Logging, Web-Request-Monitor, Web-Performance, Web-Stat-Compression, Web-Security, Web-Filtering, Web-Basic-Auth, Web-Windows-Auth, Web-App-Dev, Web-Net-Ext, Web-ASP, Web-CGI, Web-ISAPI-Ext, Web-ISAPI-Filter, Web-Mgmt-Tools, Web-Mgmt-Console, Web-Mgmt-Service -IncludeManagementTools

Verify IIS Installation

โœ”๏ธ Method 1: Using the Browser Inside the VM
Open Edge or Chrome and enter: http://localhost
You should see the default IIS welcome page.

โœ”๏ธ Method 2: Using Public IP Address, which was used in this case
Copy the VMโ€™s public IP from Azure and open: http://
If you see the IIS welcome page, the installation was successful.

Troubleshooting

๐Ÿ”ธ IIS not running?
Start it manually: (on powershell) Start-Service W3SVC

๐Ÿ”ธ Port 80 blocked?
Check NSG rules:
Allow inbound traffic on port 80 (HTTP).

๐Ÿ”ธ Browser not loading IIS page?
Verify the service:(on powershell) Get-Service W3SVC

๐ŸŽ‰ Conclusion

Youโ€™ve successfully:

โœ”๏ธ Created a Windows Server VM in Azure
โœ”๏ธ Connected via RDP
โœ”๏ธ Installed IIS
โœ”๏ธ Verified web server functionality

This setup forms the foundation for hosting websites, deploying ASP.NET apps, and building enterprise web environments.

Top comments (0)