HOW TO CONNECT RDP AND HTTP TO A WINDOWS VIRTUAL MACHINE AND INSTALL WEB A SERVER USING POWER SHELL AND ADD A DATA DISK
Published: 2023-05-11 14:02:45

In the early days of computing, systems were always physical, meaning that a computer was a discrete collection of hardware that ran an operating system and often used various input and output devices. Imagine a data center where every computer is a separate, physical device. You can also imagine that the requirements for power, cooling, networking, and management would be significant. Virtualization changed that model. Although physical computers are still a major component of many organizations’ IT infrastructure, organizations are increasingly moving toward the use of virtual machines (VMs).
 A virtual machine is an emulation of a computer system that provides the functionality of a physical computer.
The first step is to create a windows virtual machine by following the steps below
	Log in to your Azure account at https://portal.azure.com/
	From the Azure Portal dashboard, click on the "Create a resource" button in the upper left-hand corner of the screen.
	Type "Virtual Machine" in the search bar and select "Virtual Machine" from the search results and click on create

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

	On the "Basics" tab, select the subscription you want to use, and then create a new resource group or select an existing one.

	Give the virtual machine a name and choose the region where you want to create the virtual machine.

	Select the image for the virtual machine. You can choose from a list of pre-configured images provided by Microsoft or use your custom image.

	Choose the size of the virtual machine by selecting the desired number of cores and amount of RAM.

	On the "Settings" tab, configure the desired settings for your virtual machine, such as storage options, network settings, and administrative account details.

	Select inbound port; here you select RDP AND HTTP because we will test the Virtual machine IP address on a web book browser.
	Finally, review all the settings and click on the "Create" button to create the virtual machine.
 

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

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

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

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

Next is to click on resources

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zjrxn8gb28p7dxwq6ei4.png)
 After that, go the RDP and download file RDP file and click on connect and a  Enter your user name and password then click on connect virtual machine displayed as shown in the image below

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

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

The next step is to type PowerShell on the search bar of the  Virtual Machine you created and install web server in it as shown in the image below

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

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

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/z8j1w144wlz1a0cr2k8o.png)
You have successfully Installed Web Server on your Virtual Machine, you can then cope the IP Address and test on a web browser for confirmation. 


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

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

The next step is to add Data Disk to it and initialize the disk to make it useable. Doing this is by going back to the virtual machine resource and click on disk at the left hand-side of the virtual machine and fill the necessary details and click on save as shown in the image below 
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4hv1o7uxna5tznehgghh.png)

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

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/311j7wheghb5oi69i9g0.png)
Next is to go to your window virtual machine search bar and search for "Create and format hard disk partitions" and click on it and a page will display then select disk 2 and click ok. see below image

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

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/t2cvph0pjvzcm17iqk1e.png)
Here, The details of the disk you added on virtual machine will display then right click and select "New Simple Volume" and click on it, then click next as shown in the images below

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

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

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1j5pz4e08lu1fw3nw28y.png)
Next is to format it first and that can be done by changing the "new volume" to the name you want and click ok
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xwm6k0d211m1yah0uis3.png)

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

After that, here you have your data disk added and initialized

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

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


Thank you for reading and how hope you can install web server and add data disks to your virtual machine.