Creating an Azure VM
Azure provides a range of on-demand computing resources, one of which is virtual machines (VM). An Azure VM is a good solution where you need more control over the computing environment than you might be able to obtain using a PaaS service.
An Azure VM is essentially a Hyper-V VM that you run within Azure. There are some differences between the Hyper-V VMs you create within Server 2019 (or Windows 10) and Azure VMs, but they are minor. The AZ cmdlets you use to manage Azure VMs are a little different in style to Hyper-V cmdlets, which may mean a bit of a learning curve.
Getting ready
You run this recipe on CL1, which you configured (in the Using PowerShell with Azure recipe) to work with Azure. Also, you should have already created an Azure Resource Group and an Azure Storage Account, but this recipe checks for these and creates the resources if needed.
How to do it...
- Define the key variables:
$Locname = 'uksouth' # Azure location name $RgName = &apos...