Questions tagged [azure-cli2]

Azure CLI 2.0 is optimized for managing and administering Azure resources from the command line, and for building automation scripts that work against the Azure Resource Manager.

https://learn.microsoft.com/en-us/cli/azure/overview?view=azure-cli-latest

156 questions
4
votes
3 answers

What are the alternative approaches to install Azure CLI on Ubuntu without root access?

I am struggling to install Azure CLI on a Ubuntu machine without root access. The instructions here assume that we have root access (or reasonable sudo access). I am trying to run this on a Ubuntu machine (provided by IBM DevOps toolchain - root…
Manglu
  • 10,744
  • 12
  • 44
  • 57
3
votes
2 answers

Unable to run az pipeline commands within Azure DevOps Task

Trying to dynamically retrieve all the variables from a variable group via Azure DevOps task in a YAML Pipeline. Originally tried leveraging the AzureCLI@2 task with the following code to retrieve the variableGroupID which would be used to get the…
DreadedFrost
  • 2,602
  • 1
  • 11
  • 29
3
votes
2 answers

"'C:\Program' is not recognized as an internal or external command" error when using Azure CLI

Sometimes I have a problem with running various commands (I'm using Git Bash, if that matters). For example, when I try to execute: az container exec --resource-group My-RG --name influxdb-container --exec-command "/bin/bash" The command above…
mnj
  • 2,539
  • 3
  • 29
  • 58
3
votes
1 answer

How to execute powershell script using AzureCLI?

I am trying to execute a powershell script to create resources on the Azure infrastructure. I have installed Azure CLI on my machine and followed all the steps to login using az login command. I have also setup my subscription using az account set…
santosh kumar patro
  • 7,231
  • 22
  • 71
  • 143
3
votes
2 answers

Retrieve Service Bus primaryConnectionString with az cli

Is it possible to get Azure Service Bus primaryConnectionString with AZ CLI? Input parameters: Resource Group Service Bus Name
qwazer
  • 7,174
  • 7
  • 44
  • 69
3
votes
4 answers

Azure CLI 2: how to provide parameters in az group deployment create command?

I am using Azure CLI 2.0 on a windows machine and I am trying to create a Docker VM using this Microsoft documentation: az group deployment create --resource-group myResourceGroup \ --parameters '{"newStorageAccountName": {"value":…
Jeroen Heier
  • 3,520
  • 15
  • 31
  • 32
2
votes
3 answers

Unable to run az acr check-health command on MacOS

I am unable to run a health check using the Azure CLI. I am on MacOS Monterey. Below is the error: ➜ az acr check-health -n Docker daemon status: available Docker version: 'Docker version 20.10.12, build 459d0df, platform…
2
votes
2 answers

Azure cli to filter Instances using tags

I am trying to filter instances based on tags, but it is giving me all the instances present in the resource group. I need to list Instances which has a specific tag. I am using the below command to list instances that have wknhscale == 'active'…
Eva
  • 515
  • 4
  • 28
2
votes
2 answers

is it possible to list all types of app service using az cli

I am trying to list the type of app service associated with particular subscription using azure cli. Type of app service: Web apps logic apps Function apps mobile apps API apps So far I have tried to find out the individual command for these. Out…
Bheeshma
  • 143
  • 3
  • 12
2
votes
1 answer

how to grab next marker (next_marker) in azure cli command az storage fs file list

Need to calculate size of specific containers and folders at ADLS Gen2. Started with command az storage fs file list. However don't understand how to grab next_marker ? It appears in stdout as warning but not in output of command: WARNING: Next…
Alezis
  • 2,659
  • 3
  • 27
  • 34
2
votes
2 answers

Install Azure CLI and run az login command in same script with out restarting the power shell

I am working on one automated process to upload a file using azure CLI (az storage blob upload) to Azure blob and it is working fine as expected. Azure CLI version: 2.17.1 PoweShell version: PSVersion 5.1.19041.610 When the user run’s powershell…
user2282005
  • 81
  • 1
  • 6
2
votes
1 answer

Azure resource provider stuck in registering

Azure seems to be stuck in Registering. Have been at this for hours. What is the magic touch to fix this? thomas@Azure:~$ az account set -s XXXXXXXXXXXXXXXXXXXX thomas@Azure:~$ az provider show --namespace microsoft.insights -o table Namespace …
2
votes
1 answer

How can we run multiple CLI command in Azure Bash together?

I have Multiple Resources to deploy in my Environment using CLI command all together. For Example: I need to create VM, Web App, Redis Cache, etc using a single script. Instead of creating individual resources can we create all together.
Voval Jain
  • 25
  • 1
  • 5
2
votes
1 answer

Azure CLI for app registration creation from Azure DevOps - Insufficient privileges

I tried to create app registration in Azure AD with Azure CLI from Azure DevOps pipeline. Thanks to the task AzureCLI@2 (preview). But it's giving below error. "az : ERROR: Insufficient privileges to complete the operation." However when I run…
2
votes
3 answers

Azure CLI Show Resource Group Locations

So i'm trying to let the Azure CLI show all the possible location i can use for making a resource group I am searching for a command similar to az account list-locations the reason i am not using the account list-location line is because for an…
Brynn
  • 97
  • 2
  • 13
1
2
3
10 11