How to do it...

In this example, a virtual machine has been created with the name myVM and is running the latest version of Ubuntu:

  1. Create a connection with Azure using the Login-AzureRmAccount cmdlet. Next, authenticate the device by following the instructions provided:
PS> Login-AzureRmAccount
  1. Create a resource group with the New-AzureRmResourceGroup cmdlet:
PS> $ResourceGroup = 'packpub-demo'PS> $Location = 'East US'PS> New-AzureRmResourceGroup -Name $ResourceGroup -Location $Location
  1. Create a storage account with the New-AzureRmStorageAccount cmdlet:
PS> $StorageAcctName = 'packpubstorage' PS> New-AzureRmStorageAccount -Name $StorageAcctName ...

Get PowerShell Core for Linux Administrators 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.