Microsoft Azure makes it easy to deploy and configure Windows Server virtual machines (VMs). This guide walks you through launching a Windows Server VM and installing Internet Information Services (IIS) for hosting web applications.
What is Windows Server?
Windows Server is a Microsoft operating system designed for cloud-based and on-premises server environments. It provides a stable, scalable, and secure platform for hosting applications, websites, and services. Azure also allows you to configure and launch VMs that run standard Windows like Windows 10 and 11. Learn how here
Prerequisites
An active Microsoft Azure account
Azure subscription with VM creation permissions
Remote Desktop Protocol (RDP) client (pre-installed on Windows; available for macOS/Linux). For Mac OS, download here. This will allow connections to the VM hosted in Azure
What is IIS?
Internet Information Services (IIS) is a web server developed by Microsoft for hosting websites, web applications, and services on Windows Server. It supports protocols such as HTTP, HTTPS, FTP, and SMTP, making it a powerful tool for delivering dynamic and static content over the web. IIS is widely used for enterprise applications, ASP.NET hosting, and API management. Once we launch our Windows Server VM, we will install ISS.
Configure VM
In your Azure portal, search for and select virtual machines
Create or select an existing resource group
Give the VM a name
Select a suitable region. In this example, we will use East US
In this example, we will leave Availability options, Zone options, Availability zones and Security type as default
Select a Windows server image. Preferably a more recent image
In this example, we will select the free tier eligible Size. Feel free to choose your required capacity.
Create a username and password for the administrator account. You will need these credentials to log into the server
-
Allow these inbound ports:
- HTTP (80)
- RDP (3389)
Adjust other settings as required
Notice that Azure recommends that you only enable RDP ports open to the internet in testing environments. This is fine for our case but in practical use cases, you will be required to set inbound rules to limit access in the Networking tab
Connecting to the VM
Wait for the VM to configure
Download and open the RDP file. It should open automatically on Windows. If you are using Mac OS, you need the Windows App
Enter configured username and password from the VM setup process
Allow the VM to boot up. You will be logged in as your configured user
In the start menu, find Windows PowerShell. Right click and select
Run as Administrator
Enter this command into PowerShell:
Install-WindowsFeature -name Web-Server -IncludeManagementTools
- Once the setup is finished, open your browser and type in your public IP address. You can find this in the Azure portal tab you used to connect to the VM
- You should be greeted with this screen
To take down your VM when you are done and save costs, Visit this article and follow the steps under "Taking down the Windows VM"
Top comments (0)