DEV Community

Cover image for How to use PowerShell to create Resource group and virtual Machine in Azure
Tijani Mojeed
Tijani Mojeed

Posted on • Updated on

How to use PowerShell to create Resource group and virtual Machine in Azure

The first step is to go to Azure portal
Then click on the Azure cloud shell in the Azure portal and select PowerShell

Image description
Create a storage if you don’t have one

Image description

After creating your storage, you can write you script of what you want to create as shown below in the image and paste it in the PowerShell

Image description

From the above image, it shows that your Resource group has been created and that can be confirm by going to Resource group and check the list. My resource group name is myResourceGroup as you can see belowm, Also the script of whatever you want create can be pasted below the created resource as shown in Image

Image description
Then you have your virtual machine created using PowerShell in your resource group

Image description

Image description
Then you have your Virtual Machine running, to confirm if your Virtual machine has been created, go to resource group and click on the resource group you created as shown below

Image description
To check the performance of your Virtual Machine, click on Azure Advisor and see recommendation

Image description

Top comments (1)

Collapse
 
yemmyoye profile image
Yemisi Oyesainu

Nice one