DEV Community

Cover image for How to configure a Disk on a virtual machine from Azure Cloud and Install windows features using PowerShell.
Henry
Henry

Posted on

How to configure a Disk on a virtual machine from Azure Cloud and Install windows features using PowerShell.

*Step 1: Login to Azure portal *

Image description

_Click on virtual machines and create _

Image description

**Step 2:

a. Select the Azure subscription,
b. Create or select a unique resource group.
c. Create Virtual machine name
d. Select a region, if you require available options, select any but for this we need no redundancy.
e. Select Windows 10pro or any you wish
f. Create admin details (username and password)
g. Select port, RDP, HTTP because we will need to communicate to them
h. Mark licensing **_
_

Image description

Image description

Image description

Step 3 : Check the Disk information, ensure you select image default or choose anyone you wish
Better you leave it as default and click review and create

Image description

_Once Validation is passed as shown below “Click create”
_

Image description

_Once Deployment is completed, ‘Go to resource” _

Image description

Step 4: On the Virtual machine page , search for ‘Disk” under settings

Image description

Image description

_Give the Disk a name, and choose the size you desire, leave the remaining as default _
_Back to the VM overview page., connect the VM and select “Native RDP” _

Image description
_
Wait for the Public address to get configured and Download RDP file _

Image description

_Step 5: Connect to the VM on your local computer.
On your computer, Connect the Virtual Machine, this is how it will look below _

Image description

Insert your admin details.

Image description

_Leave the rest information as default, click yes _

Image description

_Step 6: Search for ‘Disk Management’ on your VM and an Initialize window will pop up, leave everything as default and select ok _

Image description
_
On the Disk2 tab , right click anywhere on it and select “ New simple volume” _

Image description

_Continue selecting the default options and click finish, until the Disk 2 is partitioned _

Image description

Image description

_Congratulations you have partitioned your Disk on your VM. _

**_Step 7: Lets install windows features on the VM through PowerShell.

Open PowerShell on your VM and ensure it is in “the name of your VM”
_**

Image description

Now enter this command “ Enable-WindowsOptionalFeature -Online -FeatureName IIS-WebServerRole”, click enter.

Image description

Image description

Once it is done. CONGRATULATIONS, YOU HAVE INSTALLED WINDOWS FEATURES AND MANAGEMENT TOOLS.

Image description

Now let’s confirm this by copying the IP address of the VM and paste it into our browser.

Image description

_CONGRATULATION, BELOW PAGE CONFIRMS YOU HAVE ATTACHED A DISK TO YOUR VM AND HAVE SUCCESSFULLY INSTALLED WINDOWS FEATURES. _

Image description

Top comments (0)