Introduction
Azure makes it seamless to deploy and manage Windows Server Virtual Machines (VMs) in the cloud. With just a few clicks, you can spin up a secure, scalable Windows Server environment that supports web hosting, enterprise applications, or administrative testing.
In this guide, we’ll walk through:
- Creating and configuring a Windows Server VM (WS-VM1).
- Securing access with RDP and HTTP rules.
- Connecting to the VM via Remote Desktop.
- Installing and configuring IIS as a web server.
By the end, you’ll have a fully deployed Windows Server 2022 VM running in Azure, configured to serve web content.
Skilling Objectives
- Deploy a Windows Server 2022 Datacenter VM in Azure.
- Configure networking rules for secure remote access.
- Connect to the VM using RDP.
- Install and test Internet Information Services (IIS).
Step 1: Create the Windows Server VM
💡 What is a Windows Server VM?
A Windows Server VM is a cloud-hosted instance of Microsoft’s enterprise server OS. It provides a flexible way to run workloads without relying on physical hardware.
Steps:
In the Azure Portal, search for Virtual Machines and select it.
On the Basics tab, configure the following settings:
Property | Value |
---|---|
Subscription | Your subscription |
Resource Group | rg-alpha |
VM Name | WS-VM1 |
Region | East US |
Availability options | No infrastructure redundancy required |
Security type | Standard |
Image | Windows Server 2022 Datacenter: Azure Edition – x64 Gen2 |
VM architecture | x64 |
Size | Standard_D4s_v3 (4 vCPUs, 16 GiB memory) |
Admin Username | prime |
Password |
P@ssw0rdP@ssw0rd (choose a secure password in real deployments) |
Inbound Ports | RDP (3389) |
Step 2: Configure Networking Rules
💡 Why configure networking?
By default, Azure VMs allow broad access. Restricting and fine-tuning inbound rules ensures better security.
Steps:
- Change the Source to My IP address.
- Click Save.
✅ This ensures that only your current IP can access the VM via Remote Desktop.
- Next, add an inbound port rule for HTTP:
- Click Add inbound port rule.
- Configure the rule as follows:
Property | Value |
---|---|
Source | Any |
Source port ranges | * |
Destination | Any |
Service | HTTP |
Action | Allow |
Priority | 310 |
Name | AllowAnyHTTPInbound |
- Click Add to apply the rule.
Step 3: Connect to the VM via RDP
💡 Why use RDP?
Remote Desktop Protocol (RDP) lets you log in to your Windows Server VM just like a physical server.
Steps:
From the WS-VM1 page, click Connect → RDP → Download RDP file.
Open the downloaded file, this launches the Remote Desktop Connection dialog.
On the login screen:
- Choose More choices → Use a different account.
-
Enter credentials:
- Username:
.\prime
- Password: (the secure password you set earlier).
- Click OK to connect.
- Click OK to connect.
- Username:
Step 4: Install IIS Web Server
💡 What is IIS?
Internet Information Services (IIS) is Microsoft’s web server, used to host websites and web apps.
Steps:
Once connected to the VM, right-click Start → Windows PowerShell (Admin).
Install IIS with the command:
Install-WindowsFeature Web-Server -IncludeAllSubFeature -IncludeManagementTools
- Navigate to the IIS root directory:
cd C:\inetpub\wwwroot\
- Replace the default web page with a sample file:
Wget https://raw.githubusercontent.com/Azure-Samples/html-docs-hello-world/master/index.html -OutFile index.html
✅ At this point, your VM is running IIS and serving a web page.
Step 5: Verify the Web Server
- Open a browser on your local machine.
- Enter the Public IP address of your VM.
- You should see the “Static HTML Site” webpage, confirming IIS is installed and serving content successfully.
Conclusion
In this project, you’ve successfully:
- Deployed a Windows Server VM in Azure.
- Secured access by customizing inbound rules.
- Connected remotely using RDP.
- Installed IIS and verified web hosting.
This workflow is foundational for cloud administrators and developers who want to host applications, websites, or services on Azure. With IIS running, you can now extend this setup to deploy enterprise apps, configure load balancers, or integrate with Azure’s advanced monitoring and security tools.
Top comments (0)