DEV Community

Cover image for Azure: Launching a Windows Server and Installing IIS
John Ogbonna
John Ogbonna

Posted on

Azure: Launching a Windows Server and Installing IIS

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
    select virtual machines

  • Select Create, then Azure virtual machine
    Azure virtual machine

  • 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
    vm config

  • Select a Windows server image. Preferably a more recent image
    Select a Windows server 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

  • Select review + create

    adjust settings

  • 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

  • Click create

    click create

Connecting to the VM

  • Once deployed, click go to resource
    click go to resource

  • Click Select
    Click Select

  • 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
    Image description

  • Enter configured username and password from the VM setup process
    configured username and password

  • Click continue
    Click continue

  • 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
    PowerShell

  • Enter this command into PowerShell:

Install-WindowsFeature -name Web-Server -IncludeManagementTools
Enter fullscreen mode Exit fullscreen mode
  • 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 IIS 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)