Configure Prerequisites for a VM with Azure Resource Manager

Configure Prerequisites for a VM with Azure Resource Manager

This is the first part of a two part video on configuring the prerequisite and deploying a virtual machine in Microsoft Azure Resource Manager.  The video gives an introduction to Azure Resource Manager and Resource Groups as well as Virtual Networks and Storage Accounts.  This video is intended for people new to Azure or Azure RM.  The script used in this video can be found below.

Click here for part two.

Copy the code and paste the code below into Microsoft PowerShell ISE.

#List Variables
# Ls variable:*
#Remove Variables
# Remove-Variable * -ErrorAction SilentlyContinue

#Get locations (locations will be different depending on subscription)
Get-AzureLocation | FL DisplayNam,Name,StorageAccountTypes

#Set Variables (storageName needs to be LC and numbers)
$location = "Central US"
$rgName = "Resource Group Name"
$netName = "vNet Name"
$storageType = "Standard_LRS"
$storageName = "Storage Account Name"

#Create the Resource Group
New-AzureRmResourceGroup -Location $location -name $rgName

#Create the Subnet and Network
$svrSubnet = New-AzureRmVirtualNetworkSubnetConfig -Name 'ServerSubnet' -AddressPrefix '192.168.200.0/24'
New-AzureRmVirtualNetwork -name $netName -Location $location -AddressPrefix 192.168.200.0/24 -Subnet $svrSubnet -ResourceGroupName $rgName

#Create new storage account
New-AzureRmStorageAccount -ResourceGroupName $rgName -Name $storageName -Type $storageType -location $location

This information is as-is with no warranty, expressed or implied.  Test it before you trust it!

Leave a Comment

Your email address will not be published. Required fields are marked *

December 2024
M T W T F S S
 1
2345678
9101112131415
16171819202122
23242526272829
3031  
Scroll to Top