Create Window 11 virtual machine in Azure portal
Tags: azure, virtualmachine, window11, cloud
Published: 2024-06-14 00:49:36

Table of contents

- Sign in to Azure
- Create virtual machine
- Connect to virtual machine
- Install windows 11
- View the windows 11 welcome page
- Clean up resources.
- Delete a reources.

Azure virtual machines (VMs) can be created through the Azure portal. This method provides a browser-based user interface to create VMs and their associated resources.

## Sign in to Azure

https://portal.azure.com/

## Create Virtual Machine

1. Enter virtual machines in the search.
2. Under Services, select Virtual machines.
3. In the Virtual machines page, select Create and then Azure virtual machine. The Create a virtual machine page opens.
4. Under Instance details, enter myVM for the Virtual machine name and choose Windows 11 pro, Version 22H2 - x64 Gen 2 for the Image. Leave the other defaults


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/esgnzn3j6fki3ymyvswz.PNG)


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/emzmdo0kmsee7st9vfae.PNG)

5.Under Administrator account, provide a username, such as azureuser and a password. The password must be at least 12 characters long and meet the defined complexity requirements.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/g0lwini7vxdidhy2xkv9.PNG)

6.Under Inbound port rules, choose Allow selected ports and then select RDP (3389) and HTTP (80) from the drop-down.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zfbinenp0y0x2c4i0ft2.png)

7.Leave the remaining defaults and then select the Review + create button at the bottom of the page.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xkzhavsbmevgjhh85ksb.png)

8.After validation runs, select the Create button at the bottom of the page.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kgp4u7o4uvn1g27dsh9c.PNG)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r2j77cw4924z223tu3ir.PNG)

9.After deployment is complete, select Go to resource.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rrsunqq87cswqruz0j6l.PNG)

## Connet to Virtual Machine
Create a remote desktop connection to the virtual machine. These directions tell you how to connect to your VM from a Windows computer. On a Mac, you need an RDP client such as this Remote Desktop Client from the Mac App Store.

1.On the overview page for your virtual machine, select the Connect > RDP


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ydyww2hmf01s4r9c6jye.PNG)

2.In the Connect with RDP tab, keep the default options to connect by IP address, over port 3389, and click Download RDP file


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gpktiro9qn9he2lkk0xq.PNG)

3.Open the downloaded RDP file and click Connect when prompted.

4.In the Windows Security window, select More choices and then Use a different account. Type the username as localhost\username, enter the password you created for the virtual machine, and then click OK.

5.You may receive a certificate warning during the sign-in process. Click Yes or Continue to create the connection.

## Install windows 

To see your VM in action, install the windows 11 pro. Open a PowerShell prompt on the VM and run the following command:

When done, close the RDP connection to the VM.

## View the windows 11 welcome page

In the portal, select the VM and in the overview of the VM, hover over the IP address to show Copy to clipboard. Copy the IP address and paste it into a browser tab. The default  welcome page will open, and should look like this:



![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/s98qa9xmeyu760uu4z0s.PNG)

## Clean up resources

## Delete resources
When no longer needed, you can delete the resource group, virtual machine, and all related resources.

1. On the Overview page for the VM, select the Resource group link.

2. At the top of the page for the resource group, select Delete resource group.

3.A page will open warning you that you are about to delete resources. Type the name of the resource group and select Delete to finish deleting the resources and the resource group.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lxm41vrrjp75t96mfw9v.PNG)