How To Create An Azure Virtual Machine In PowerShell From The Ground Up

Creating a virtual machine in Azure with PowerShell is really just a single command called New-AzureRmVm that’s in the AzureRm PowerShell module but if you’re starting from scratch, there’s a whole lot more to do. A VM depends on a whole list of resources including things like a virtual network, a storage account, a public IP address if you want to be able to connect to it, operating system images and more.

In this snip, we’ll create all of the dependent resources in Azure that is required to create an Azure virtual machine and finally create the virtual machine itself all in PowerShell.

Prerequisites include: AzureRM PowerShell module Azure Subscription