Continuing from my last article about AzureRM, this article will show you how to create a Microsoft Azure Resource Group using PowerShell script.
To get started login to Azure using the two lines below:
Login-AzureRmAccount Get-AzureRmSubscription | Sort SubscriptionName | Select SubscriptionName
Next select the subscription you will use to create the resource group:
$subscr="Azure Pass" Get-AzureRmSubscription –SubscriptionName $subscr | Select-AzureRmSubscription
Use the code below to create the actual resource group:
$rgName="RGEAST27" $locName="australiaeast" New-AzureRmResourceGroup -Name $rgName -Location $locName
My recommendation will be to group the entire code and run it.