Azure CLI Query

Recently, I attended a webinar, and I got some queries. This article discusses those queries on Azure CLI and their answers.

Table of Contents

Azure CLI Query

Let us discuss all the possible questions and answers related to Azure CLI.

What is the Azure CLI command to create a new pipeline?

Answer: az pipelines create. you can also use the Azure Portal to create a new pipeline. You need to open your Azure DevOps project, click on the Pipeline, and then click the Create Pipeline option. Check out the below screenshot for your reference.

What is the Azure CLI command to create a new pipeline named first-pipeline?

In which operating system, we can use Azure CLI?

Answer: Windows, macOS, and Linux

What is the Azure CLI command to list all team members?

Answer: az devops team list-member

Where is Azure CLI installed on Windows

Answer: Below are the default locations.

C:\Program Files\Microsoft SDKs\Azure\CLI2 (For 64-bit)

C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2 (For 32-bit)

What is the Azure CLI command to create a machine learning workspace?

Answer: az ml workspace create -n <Your workspace name> -g < Your resource group name> -l <location>

What is the Azure CLI command to get the description of a team

Answer: az devops team show

What do you need to install on your machine to let you execute Azure CLI commands locally

Answer: Azure Command-Line Interface (Azure CLI) via an MSI or ZIP file.

What is the Azure CLI command to check unique cosmos db name?

Answer: az cosmosdb check-name-exists –name <your_cosmos_db_name>

What is the Azure CLI command to list in table format the top 10 members of a team

Answer: az devops team list-member with –query parameter.

What is a good reason to use the Azure CLI?

Answer: It is so quick to get your Azure task done.

Which Azure CLI prefix is used to create an Azure Virtual Machine

Answer: az vm create

Which Azure CLI command is used to create new tag values?

Answer: az tag add-value

Why would you use the Azure cloud shell instead of the Azure CLI or PowerShell

Answer: You can get readily accessible browser-based applications without installing extra software on your local machine.

Which CLI command is used to unlock a locked Azure resource group?

Answer: az lock delete

Which Azure CLI command should you use to create the service endpoint

Answer: az network service-endpoint

Which Azure CLI command is used to add a new Azure ad group?

Answer: az ad group create

Which Azure CLI command authenticates to an Azure account?

Answer: az login

Which CLI command can be used to select an Azure subscription

Answer: az account set

Where is Azure CLI in Azure Portal

Answer: On the top right, just before the notifications icon, click the CloudShell button.

Where is Azure CLI in Azure Portal

How to get service principal id in Azure CLI

Answer: az ad sp list

Which Azure CLI command is used to add a new Azure AD user account?

Answer: az ad user create

How to downgrade Azure CLI

Answer: You can uninstall the Azure CLI from your machine, and then you can install the lower version again.

Which Azure CLI command is used to create a virtual network?

Answer: az network vnet create

Which CLI command can be used to navigate between Azure AD tenants?

Answer: az login -tenant or az account set

What is the Azure CLI command to view the score of a model

Answer: az ml model show –name <model_name> –workspace-name <workspace_name> –resource-group <resource_group_name>

Which Azure CLI command shows the various Azure clouds

Answer: az cloud list

How to check if Azure CLI is installed

Answer: You can run the “az –version” command to check which version of Azure CLI is installed on your machine.

What is the Azure CLI command to view the score of a model?

Answer: az ml model show –name <model_name> –resource-group <resource_group_name> –workspace-name <workspace_name>

Which Azure CLI module is used to manage policies?

Answer: az policy

Which CLI command can be used to select an Azure subscription?

Answer: az account set

Which Azure CLI command authenticates to an Azure account

Answer: az login

How to get resource id in Azure CLI

Answer: az resource

You may also like following the articles below.

Azure Virtual Machine

DOWNLOAD FREE AZURE VIRTUAL MACHINE PDF

Download our free 25+ page Azure Virtual Machine guide and master cloud deployment today!