DEV Community

Cover image for Deploying a Web Server VM and Installing IIS on Windows
Samuel Ojo
Samuel Ojo

Posted on

Deploying a Web Server VM and Installing IIS on Windows

Introduction
Windows Server 2022 is Microsoft’s latest server operating system, designed for enterprise workloads, enhanced security, and hybrid cloud integration. Deploying it on Azure provides a fast, scalable, and cost-effective way to run server-based applications without investing in physical infrastructure. In this lab, you’ll learn how to create a Windows Server 2022 Datacenter VM in Azure, configure remote access via RDP, and install IIS to host a simple web page. This hands-on exercise is perfect for IT professionals and developers looking to explore server roles and Azure’s capabilities.

Key Terms
Virtual Machine (VM): A software-based computer that runs an operating system and applications like a physical computer, but is hosted on a cloud or virtualization platform.

Azure: Microsoft’s cloud computing platform offering services like virtual machines, storage, networking, and more.

Windows Server 2022 Datacenter: A server operating system optimized for enterprise workloads, virtualization, and cloud integration.

RDP (Remote Desktop Protocol): A protocol that allows you to connect and control a remote computer over a network.

IIS (Internet Information Services): A web server developed by Microsoft for hosting websites and web applications.

Availability Zone: A physically separate location within an Azure region that provides high availability and fault tolerance.

What You’ll Learn
Step 1: Create a Web Server VM
Step 2: RDP into the VM
Step 3: Open PowerShell as Administrator
Step 4: Install IIS (Web Server)
Step 5: Verify IIS Installation

Create virtual machine
1.Navigate to https://portal.azure.com.- Sign in with your Azure account credentials.

Azure portal

Enter virtual machines in the search.

Search virtual machine

2.Under Services, select Virtual machines.
In the Virtual machines page, select Create and then Azure
virtual machine
. Then Create a virtual machine page opens.

3.In the Basics tab, under Project details, make sure the correct subscription is selected and then choose or Create new resource group. Mine is storagerg.

Create new resource group

4.Under Instance details, enter IISvm for the Virtual machine name, and choose choose Windows Server 2022 Datacenter - x64 Gen 2 for the Image. The default size and pricing is only shown as an example. Size availability and pricing are dependent on your region and subscription.

Instance details

5.Under Administrator account, select password.
6.In Username enter azureuser.
7.Enter password and confirm password.

Administrator account

8.Under Inbound port rules > Public inbound ports, choose Allow selected ports and then select HTTP (80) and RFDP(3389) from the drop-down.

9.Navigate to Monitoring tab > Diagnostics > select Disable.

Disable Diagnostics

Navigate to Tags tab. Create Tag (Name **and **value). Then select the Review + create button at the bottom of the page

Review + create virtual machine

10.On the Create a virtual machine page, you can see the details about the VM you are about to create. When you are ready, select Create.

create virtual machine

11.When the deployment is finished, select Go to resource

Go to resource

12.On the page for your new VM, select the public IP address and copy it to your clipboard.

public IP

13.Increase the Idle timeout (minutes) to 30.

Idle Idle timeout

End of step 1

Step 2: RDP into the VM
Once the VM is deployed, follow these steps to connect:

🔹 On Windows:

  • Open Remote Desktop Connection (RDP)
  • Enter the public IP address of the VM
  • Click Connect

Connect to Vm on axure portal

Download RDP file

Connect RDP

  • Enter your Admin username & password

Admin username & password

  • Click OK

Click ok

🔹 On macOS/Linux:
Use an RDP client like Microsoft Remote Desktop.

Step 3: Open PowerShell as Administrator

  • Once connected to the VM, open PowerShell:

  • Click the Start menu

PowerShell

  • Type PowerShell
  • Right-click Windows PowerShell and select Run as administrator

4: Install IIS (Web Server)
Run the following command to install IIS and its management tools:

Install-WindowsFeature -name Web-Server -IncludeManagementTools
Enter fullscreen mode Exit fullscreen mode

Install IIS Web Server

Installing IIS Web Server

Installed IIS Web Server

Step 5: Verify IIS Installation
After installation, verify that IIS is running:

📌 Method 1: Public IP Address
Copy your VM’s public IP address
Open a browser and enter:
http://your_vm_ip in this lab, mine is:
http://20.187.54.47

Verify IIS Installation

📌 Method 2: Localhost
Open a web browser
Go to http://localhost
You should see the default IIS welcome page

If IIS is installed correctly, you should see the IIS default page.

Thanks for reading — see you in the next one

Top comments (0)