Azure CLI Get-AzDisk Get-AzSubscription Get-AzVM Login-AzAccount Microsoft Microsoft Azure Select-AzSubscription Start-AzVM Stop-AzVM Storage Update-AzDisk Virtual machines
In this post, I want to show you how to expand a managed operating system disk in an Azure virtual machine, using Azure PowerShell and Azure CLI. This tutorial assumes that you already have a Microsoft Azure account configured.
If you want to know how to install the PowerShell Azure module on your machine, check out this
link. The simplest way to get started is to sign in interactively at the command line.
Login-AzAccount
This cmdlet will bring up a dialog box prompting you for your email address and password associated with your Azure account. If you have more than one subscription associated with your mail account, you can choose the default subscription. To perform this task we will use the following commands:
You can use it in your browser with Azure Cloud Shell, or install it on your machine. If you want to know how to install the Azure CLI, check out this
link. The way to get started is to sign in interactively at the command line.
az login
This command will bring up a dialog box prompting you for your email address and password associated with your Azure account. If you have more than one subscription associated with your mail account, you can choose the default subscription. to perform this task we will use the following commands:
az account list
az account set --subscription "Subscription Name"
Once you set your default subscription, you’re ready to start.