Introduction
Microsoft Azure offers a highly scalable and efficient platform for deploying Windows Server instances. One frequent use case is to configure a Windows Server with Internet Information Services (IIS) to host websites and applications. This article explains how to setup a Windows Server on Azure and install IIS.
Step 1: Log into Azure Portal
- Navigate to Azure Portal and log in with your credentials.
- On the homepage, click on Create a resource.
- Create and review
Step 2: Create a Windows Server Virtual Machine (VM)
- On the homepage, search Virtual Machine and click create
Fill in the required details
Subscription: Select your active Azure subscription.
Resource Group: Choose an existing resource group or create a new one.
Virtual Machine Name: Provide a unique name for the VM.
Region: Choose the nearest or preferred Azure region.
Availability options: Choose the default (Availability zone)
Zone options: Choose the default self-selected zone
Availability zone: Choose any zone of your choice depending on the cost
Image: Select the version of Windows Server (e.g., Windows Server 2022 Datacenter).
- Size: Select an appropriate VM size based on your workload.
Configure Administrator Account:
Provide a username and strong password.
Under Inbound Ports, allow RDP (3389) and HTTP (80) for remote desktop access.
- Click Next: Disks and configure storage as per requirements (leave at defaults if neccessary).
- Click Next: Networking and configure the Virtual Network and Subnet (for practice purpose leave it at its defaults).
- On monitoring: On Boot diagnostics, for practice purposes, click on disable to avoids unnecessary Azure storage costs or monitoring from Microsoft. Again, disabling it speeds up the virtual machine (VM) creation.
- Tags: Give tag a name and value
- Click Review + Create, validate settings, and click Create.
Step 3: Connect to Windows Server
- Once deployment is complete, go to the Virtual Machines section.
- On the Windows server overview, click on the public ip address to extend the minutes of the idle timeout of the window server created
- Select your newly created VM and click on connect.
- Click Connect.
- click on select and wait on the right page showing validating to change to configured
- Click Download the RDP file and open it.
- Click on check access to change to accessible (otherwise your IIS server that will be installed on PowerShell will not open in any browser)
- Download the RDP file and click on connect.
- Log in using the credentials set during VM creation.
Enter your administrator credentials when prompted.
You now have a Windows Server 2020.
Step 4: Install IIS (Internet Information Services)
- Open PowerShell on the Windows server and run the following command to install IIS: Install-WindowsFeature -name Web-Server -IncludeManagementTools
- Wait for the installation to complete.
- Once installed, verify the installation by checking the IIS service: Run the command Get-WindowsFeature -Name Web-Server to verify the installation
Step 5: Verify IIS Installation
- Copy the public IP of the window server; note the public address is now showing accessible.
- Open a web browser and paste the ip address, If IIS is installed correctly, the default IIS Welcome Page should appear.
Conclusion
You have successfully set up a Windows Server in Microsoft Azure and installed IIS for web hosting. You may now host and administer websites or applications on your Azure-based Windows Server. For more complex options, look into custom domain setup, SSL certificates, and firewall policies.
Top comments (0)