Create a Windows virtual machine in the Azure portal

Create a Windows virtual machine in the Azure portal: Azure virtual machines can be created through the Azure portal. This method provides a browser-based user interface for creating and configuring virtual machines and all related resources. After reading this full post “Create a Windows virtual machine in the Azure portal” you will learn to create VMs in Aure portal.
If you don’t have an Azure subscription, create a free account before you begin.

Log in to Azure

Log in to the Azure portal at

Create virtual machine

      1. Click the New button found on the upper left-hand corner of the Azure portal.
      2. Select Compute, and then select Windows Server 2016 Datacenter.
      3. Enter the virtual machine information. The user name and password entered here is used to log in to the virtual machine. When complete, click OK.
    Create Windows VM Basic Blade

    Create Windows VM Basic Blade

          1. Select a size for the VM. To see more sizes, select View all or change the Supported disk type filter.
    Create Windows VP Portal Sizes

    Create Windows VP Portal Sizes

        1. Under Settings, keep the defaults and click OK.
        2. On the summary page, click Ok to start the virtual machine deployment.
        3. The VM will be pinned to the Azure portal dashboard. Once the deployment has completed, the VM summary automatically opens.

    Connect to virtual machine

    Create a remote desktop connection to the virtual machine.

          1. Click the Connect button on the virtual machine properties. A Remote Desktop Protocol file (.rdp file) is created and downloaded.
    Portal Quick Start

    Portal Quick Start

        1. To connect to your VM, open the downloaded RDP file. If prompted, click Connect. On a Mac, you need an RDP client such as this Remote Desktop Client from the Mac App Store.
        2. Enter the user name and password you specified when creating the virtual machine, then click Ok.
        3. You may receive a certificate warning during the sign-in process. Click Yes or Continue to proceed with the connection.

    Install IIS using PowerShell
    On the virtual machine, start a PowerShell session and run the following command to install IIS.

     Install-WindowsFeature -name Web-Server -IncludeManagementTools

    When done, exit the RDP session and return the VM properties in the Azure portal.

    Open port 80 for web traffic

    A Network security group (NSG) secures inbound and outbound traffic. When a VM is created from the Azure portal, an inbound rule is created on port 3389 for RDP connections. Because this VM hosts a webserver, an NSG rule needs to be created for port 80.

        1. On the virtual machine, click the name of the Resource group.
        2. Select the network security group. The NSG can be identified using the Type column.
        3. On the left-hand menu, under settings, click Inbound security rules.
        4. Click on Add.
        5. In Name, type http. Make sure Port range is set to 80 and Action is set to Allow.
        6. Click OK.

    View the IIS welcome page

    With IIS installed, and port 80 open to your VM, the webserver can now be accessed from the internet. Open a web browser, and enter the public IP address of the VM. The public IP address can be found under Virtual Machines in the Azure portal.

    Default IIS Website

    Default IIS Website

    Clean up resources

    When no longer needed, delete the resource group, virtual machine, and all related resources. To do so, select the resource group for the VM and click Delete.

Leave a Comment