Different ways to Create and Manage resources in Microsoft Azure.

Another good reason to use Microsoft Azure, it supports multiple ways to Create and Manage the resources. where operational engineers and developers can take advantage of automation. whether you want to create a new VM, stop VM, create a new storage container, and etc.

The Portal.

As a newbie to Azure and want to explore, then this is the best place to start. Azure Portal is a Web-based console that provides an alternative to command-line tools. to start using this you no need to have any prior experience or any command-line skills. it is pretty much straight forward GUI. you can create, manage, and monitoring all your resources from this portal. initially Azure started with the classic portal (manage.windowsazure.com). but thankfully now we have a new portal (portal.azure.com). we have very little reasons to visit the classic portal. the main difference you should know is the Classic works based on API and the new portal works on ARM templates (which is very important will discuss in a separate blog ).

How the Azure portal looks
  1. It is a portal Menu. where you can see all the information about resources. which is comes with two options Flyout and Docked. you can change the settings as you wish.
  2. this is where you can see all your favorite services. you can easily add services to the favorite list –> All services –> keep your mouse on the service for one sec –>new page will pop up –> then click on the star symbol.
  3. this is the place where you can start cloud shell and change default settings with the help of gear symbol. you can see your login details. and you can change directory + subscription details also will discuss more this in upcoming blogs.
  4. once you click on the gear symbol, a new page will pop up which helps you to customize the page as you like.

The Azure Powershell:

Azure Powershell is a set of cmdlets (command lets) helps you to create and manage the Azure resources directly from the PowerShell command line. we can download the Azure PowerShell module to your local machine or we can use Azure cloud shell which provides from the portal. PowerShell uses the “verb-noun” naming system so it is very easy to guess commands like “New-AZvm” which helps to create a new VM. you no need to be pro in PowerShell to start using. we have the best communities and code samples from Github to start.

Tip: It is a very powerful tool than you think. so read and understand the commands before you execute.
"With great power comes great responsibility"

Sample code: the below commands help you to create a new VM. Code

New-AzVm `
    -ResourceGroupName "myResourceGroup" `
    -Name "myVM" `
    -Location "East US" `
    -VirtualNetworkName "myVnet" `
    -SubnetName "mySubnet" `
    -SecurityGroupName "myNetworkSecurityGroup" `
    -PublicIpAddressName "myPublicIpAddress" `
    -OpenPorts 80,3389

The Azure CLI:

Azure CLI is PowerShell like tool. It is open source project which you can access from Github.

if you are from powershell background it takes some time to adjust yourself around CLI. Because powershell object base output and CLI json based.The below command used to create new VM. you can compare both powershell and CLI commands.

az vm show -g QueryDemo -n TestVM --query 'osProfile.adminUsername' -o json

az vm create 
    --resource-group myResourceGroup 
    --name myVM 
    --image win2016datacenter 
    --admin-username azureuser

as you see the output is in Json format. so which is little bit tricky to query the required information. you can read more about json here.

we have few other ways like API, ARM, and SDKs in different languages.these are mostly uses by developers so i am not talking about these.

Thanks for reading. Happy learning .

Recent Posts