How to Start Azure Virtual Machine With Azure CLI

Azure is a cloud computing platform and Azure Virtual Machines (VMs) are a key component of Azure.

Azure VMs let you run applications and services in the cloud. You can create Azure VMs in minutes with the Azure CLI. In this blog post, we will show you how to start an Azure VM with the Azure CLI.

About Azure CLI

Microsoft Azure CLI is a cross-platform command-line tool (available on Windows, Linux and macOS) that allow us to manage Azure programmatically from the command line. Azure CLI is used to manage Azure resources, including VMs.

In this post, we will show you how to start an Azure VM from the command line using Azure CLI.

To start an Azure VM with Azure CLI, you need to first install Azure CLI. You can find instructions for installing Azure CLI here:

Once you have Azure CLI installed, you can start an Azure VM with the following command:

az vm start --name myVM --resource-group myResourceGroup

Replace “myVM” and “myResourceGroup” with the name of your Azure VM and resource group. This will start your Azure VM. You can verify that your Azure VM is started by running the following command:

az vm show --name myVM --resource-group myResourceGroup

This will display information about your Azure VM, including whether it is started or not.

If you need to stop your Azure VM, you can use the following command:

az vm stop --name myVM

To list all the VM inside your Azure subscription run.

az vm list -o table
,


Posted

in

,

by