Posts

Showing posts with the label Virtual Machine

Create a Windows Server 2012 R2 VM using ARM in Azure PowerShell

Image
In this Blog Post we will learn   how to create an Azure ARM Virtual Machine using Azure PowerShell . For this, you will need an Azure Subscription and machine with Latest Azure PowerShell installed.   1. Run the following script in Azure Powershell:  //Replace MyName with YourName everywhere. Login-AzureRmAccount   $locName = "Central US" $rgName = "MyName-RG" $vnetName = "MyName-VNET"   #Getting the Storage Account $StorageAccount = Get-AzureRmStorageAccount -ResourceGroupName $rgName $StorageName = $StorageAccount.StorageAccountName   #Getting the Virtual Network MyName-VNET $vnet = Get-AzureRmVirtualNetwork -Name $vnetName -ResourceGroupName $rgName   #Create a Public IP address $ipname = "MyNameVM2-PIP" $pip = New-AzureRmPublicIpAddress -Name $ipName -ResourceGroupName $rgName -Location $locName -AllocationMethod Dynamic   # Create A Network Interface $nicName = "mynamevm2nic" $nic = New-AzureRmNetworkInterface -Name $nicName -Reso...