How to do it...

Let's perform the following steps:

  1. Connect to your Azure Stack VM and open the Azure portal. Navigate to the Marketplace management and download the Windows Server 2016 Datacenter Pay-as-you-use item:
  1. Next, download the DSC item from the same page.
  2. As soon as the marketplace items are downloaded, you can create your first VM. To do it, create a resource group and make use of the quick create functionality of New-AzureRmVm:
New-AzureRmResourceGroup -Name VM -Location local$adminCredential = [pscredential]::new('VmAdmin', ('M3g4Secure!' | ConvertTo-SecureString -AsPlainText -Force))New-AzureRmVM -ResourceGroupName VM -Location ...

Get Powershell Core 6.2 Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.