Chirag Nagrekar has Published 465 Articles

How to get the fault domain count of the Azure Availability set using PowerShell?

Chirag Nagrekar

Chirag Nagrekar

Updated on 02-Sep-2021 11:44:49

The fault domain in the Azure Availability set describes the VMs in the availability set that share the common Power, Storage, network switch, etc. If there is a failure in the fault domain then all the resources in the fault domain will become unavailable.Before running the command make sure that ... Read More

How to open port for the Azure VM using Azure CLI in PowerShell?

Chirag Nagrekar

Chirag Nagrekar

Updated on 02-Sep-2021 11:37:04

To open the specific port for the Azure VM using Azure CLI, we can use az vm open-port command. Before running this command, make sure that you are connected with the Azure Cloud account and the proper Azure subscription.To open port 80 we can use the below command.az vm open-port ... Read More

How to resize the Azure VM using Azure CLI in PowerShell?

Chirag Nagrekar

Chirag Nagrekar

Updated on 02-Sep-2021 11:35:32

To resize the Azure VM using az CLI, we can use “az vm resize” command. Before running this command, make sure you are connected to the Azure cloud and the proper Azure subscription.To get the current size of the VM, PS C:\> az vm show -n Win2k16VM1 -g testvmrg --query ... Read More

How to list the azure VM extensions using Azure CLI in PowerShell?

Chirag Nagrekar

Chirag Nagrekar

Updated on 02-Sep-2021 11:33:47

To list all the azure VM extensions using Azure CLI, we can use the “az vm extension” command.Before running this command make sure you are connected with the Azure cloud account and the Azure subscription. Once we run the command for the extension we need to provide the VM name ... Read More

How to get all the available azure VM images using Azure CLI in PowerShell?

Chirag Nagrekar

Chirag Nagrekar

Updated on 02-Sep-2021 11:31:52

To get all the available azure VM images using Azure CLI, you can use the command az vm image.The below command will retrieve all the available azure images in the marketplace.PS C:\> az vm image list --allThe above command will take some time to retrieve the output. To get the ... Read More

How to get the available azure VM size using Azure CLI in PowerShell?

Chirag Nagrekar

Chirag Nagrekar

Updated on 02-Sep-2021 11:28:20

To get all the available Azure VM sizes using Azure CLI from the specific location, we can use the az vm list-sizes command.PS C:\> az vm list-sizes -l eastusThe default output is in the JSON format, as shown below.To get the output in the table format, use the below command.PS ... Read More

How to restart the Azure VM using Azure CLI in PowerShell?

Chirag Nagrekar

Chirag Nagrekar

Updated on 02-Sep-2021 11:27:17

To restart the Azure VM using PowerShell, we can use the az vm restart command. This command requires the Azure VM in the running status. You also require to connect to the Azure cloud account and the proper azure subscription before running this command.Let assume our VM win2k16vm1 is currently on. ... Read More

How to stop the Azure VM using Azure CLI in PowerShell?

Chirag Nagrekar

Chirag Nagrekar

Updated on 02-Sep-2021 11:25:49

To stop the azure VM using Azure CLI we can use the az vm stop command. Before running this command make sure that you are connected to the Azure account and the proper Azure subscription.When we run this command, we need to provide the Azure VM name (-n) and the ... Read More

How to start the Azure VM using Azure CLI in PowerShell?

Chirag Nagrekar

Chirag Nagrekar

Updated on 02-Sep-2021 11:24:30

To start the stopped Azure VM using Az CLI, we can use the az vm start command. Before starting the azure VM, make sure that you are connected to the desired subscription and the Azure cloud account.To start the specific VM, we will use the command below.PS C:\> az vm start ... Read More

How to deallocate the Azure VM using Azure CLI in PowerShell?

Chirag Nagrekar

Chirag Nagrekar

Updated on 02-Sep-2021 11:22:59

To deallocate the Azure VM using Azure CLI, we need to use the VM deallocation command az vm deallocate and need to provide the name of the VM and the resource group of the VM.Before running the deallocation command, make sure that you are connected to the proper azure subscription ... Read More

Advertisements