Questions tagged [azure-cli]

The Azure CLI allows Azure users to manage their Azure assets and interact with their Azure services, applications, containers, and infrastructure in an idiomatic way.

Learn more here!

2057 questions
5
votes
1 answer

How to use Powershell splatting for Azure CLI

I want to use Powershell splatting to conditionally control which parameters are used for some Azure CLI calls. Specifically for creating CosmosDb collections. The target was something like this: $params = @{ "db-name" = "test"; …
Alex AIT
  • 17,361
  • 3
  • 36
  • 73
5
votes
2 answers

Why does certain Azure CLI commands require az login

In our VSTS release pipeline we want to call a powershell script that adds a function key for one of my Azure Functions (using the Key Management rest API). I've created a script based on this…
Kimmen
  • 717
  • 6
  • 18
5
votes
4 answers

Azure CLI: delete all untagged images within a repository in one command

I am storing my docker images in a private repository on Azure. Everytime I push an image to that repository with the same tag (e.g., latest), the previous image becomes untagged, but remains in the repository. This has led to stacking a lot of…
Nicolas El Khoury
  • 5,867
  • 4
  • 18
  • 28
5
votes
2 answers

Azure CLI vs Python SDK

Is there a recommended approach in terms of using either Azure CLI or the Azure Python SDK? The CLI seems to be better documented but since it's built on Python, I would assume it will eventually share a lot of the functionality of the Azure Python…
vonec
  • 681
  • 10
  • 22
5
votes
1 answer

How to use azure-cli node package in Node js application

I am developing a Node js application. I want to use the azure-cli package in my application to create HDI cluster and VM. npm install azure-cli -g --save Above command install the azure-cli v1.0 only. How and where should I use the azure commands…
Galet
  • 5,853
  • 21
  • 82
  • 148
5
votes
2 answers

How to stop a functionapp in a slot using azure CLI

I would like to issue a command using Azure CLI that stops a functions app in a particular deployment slot only. The Azure CLI 2.0 documentation Azure CLI 2.0 documentation lists the command: az functionapp stop --name …
ubienewbie
  • 1,771
  • 17
  • 31
5
votes
3 answers

listKeys for Azure function app

How do I list the keys of an azure function app using the listKeys ARM function? My template: { "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", "contentVersion": "1.0.0.0", "parameters": {}, …
Flynn Handley
  • 400
  • 1
  • 4
  • 9
5
votes
3 answers

How to provide a SAS token to Azure CLI within PowerShell

I'm using the Azure CLI 2.0 from PowerShell to manage a storage account. I have a SAS token (which I am storing in a variable) and I want to use it in a command. Here's the script I'm running: $sasToken =…
John
  • 5,452
  • 8
  • 37
  • 37
4
votes
0 answers

bash: /azureml-envs/lib/libtinfo.so.6: no version information available (required by bash)

I build a docker image with azure client installed, and every time when I run azure command, this error message shows up. My docker building file is as follows. FROM mcr.microsoft.com/azureml/openmpi4.1.0-ubuntu20.04:20220714.v1 ENV…
Gary Li
  • 41
  • 2
4
votes
2 answers

How to get more than the first 25 secrets from an Azure key vault via command line?

I am using az keyvault secret list to get secrets from my Azure key vault. Its help says: Arguments --maxresults : Maximum number of results to return in a page. If not specified, the…
Claus Appel
  • 1,015
  • 10
  • 28
4
votes
1 answer

Az CLI: Cannot run pipeline with runtime parameters

I'm trying to run a pipeline using AZ CLI. I have a simple pipeline: parameters: - name: initials displayName: Initials type: string trigger: - master pool: vmImage: ubuntu-latest steps: - script: echo ${{ parameters.initials }} …
Matt Immer
  • 327
  • 1
  • 13
4
votes
2 answers

Azure CLI 2.x is not installed on this machine

I'm trying to upload blobs using "az storage blob upload-batch". I got below two exceptions. ##[error]Azure CLI 2.x is not installed on this machine. ##[error]Script failed with error: Error: Unable to locate executable file: 'pwsh'. Please verify…
4
votes
1 answer

Az CLI - Register an Azure AD B2C Application

I am struggling to find an Az-Cli command that will enable me to register or create an Azure AD B2C application. Anyone able to point me in the right direction? By the way, I wouldn't mind Azure Powershell as a possible solution either.
4
votes
1 answer

github action azure/login@v1 not working on self hosted git runner?

Anyone familiar with this issue? The example from https://github.com/Azure/cli does not work on self-hosted github runner it seems as az is missing gitaction.yml name: auzure-deployment on: push: branches: [ main ] jobs: myjob: …
user670186
  • 2,588
  • 6
  • 37
  • 55
4
votes
2 answers

How can you set up an alert when a message arrives in the Dead letter Queue in Azure Servicebus

I want to create an alert in Azure when a message hits the dead letter queue in azure servicebus , I checked the monitoring and cant see an option for when a "NEW" message arrives in the queue. Also is there any way of viewing the DeadLetterQueues…
itye1970
  • 1,654
  • 7
  • 31
  • 62