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
0
votes
1 answer

azure monitor action rule create fails with rule type ActionGroup via CLI

Bug description: Getting an issue, while trying to create a "azure monitor action rule" with "ActionGroup" as rule type using Azure CLI. No specific parameter to pass "action group id" when rule-type is passed as ActionGroup. What is the name of the…
Rajesh
  • 31
  • 7
0
votes
1 answer

Getting error while creating managed disk from a VHD file in a storage account in the same subscription with CLI

Facing issue while creating managed disk from a VHD file in a storage account in the same subscription with CLI. I have replicated/copied managed disk icremental snapshot from westus region to eastus region using below script. #Provide the name of…
0
votes
1 answer

Error "The specified application package does not exist." While checking that if azure batch application package is exists or not from azure cli?

I want to create an application package via bit-bucket deployment pipeline and I want to check that the same application package name and version is already available or not. If available, then I want to update package-file in it. If Not…
0
votes
2 answers

How to check if an azure resource is already in use using azure CLI?

Let's assume that an azure resource, ex "storage account" is being updated! at the same time if I run a command like az storage account update --default-action Allow --name MyStorageAccount --resource-group MyResourceGroup It will throw an error…
Ahmed Mohamed
  • 464
  • 1
  • 4
  • 13
0
votes
1 answer

how to use npm in azure cli?

I wanted to make a chatbot with(https://learn.microsoft.com/en-us/azure/bot-service/bot-builder-tutorial-dispatch?view=azure-bot-service-4.0&tabs=python) The tutorial asks me to install botdispatch with npm. So I use "npm i -g npm" in cloud cli, but…
andy
  • 1,951
  • 5
  • 16
  • 30
0
votes
1 answer

webapp doesn't exist with Azure CLI 2.0.79

I have upgraded recently to 2.0.79 due to the problems with 2.0.78 caused with static HTML pages I am following this Microsoft tutorial but keep getting the error "webapp anotherwebapp doesn't exist" when I enter the command: az webapp up…
L. Full
  • 440
  • 2
  • 5
  • 17
0
votes
1 answer

Set-AzApiManagementPolicy in az cli

Is there an az cli equivalent command to azure powershell's Set-AzApiManagementPolicy? Since az apim is still in preview I doubt it, but perhaps there's an az rest command I'm missing.
Jurgy
  • 2,128
  • 1
  • 20
  • 33
0
votes
1 answer

"az ad sp credential list " command output "enddate" to standard date format conversion

I am trying to get reports for expiry date of Azure AD SPN credentials using Az cli. I am able to get reports using Az cli "az ad sp credential list" but stuck with date conversion. az ad sp credential list --id xxxxxx-xxx-xxx-xx --query…
paulpuvi
  • 45
  • 1
  • 1
  • 7
0
votes
1 answer

Injecting secret into Azure Windows VM at time of provisioning

I'm using Azure CLI for VM deployment. I've secret which is currently stored in Azure Key Vault which I wanted to store it in C drive of the windows VM. I'm not sure how to perform the same at the time of VM deployment I've found couple of articles…
aquib.qureshi
  • 557
  • 1
  • 8
  • 21
0
votes
1 answer

python on ubuntu linux : json.decoder.JSONDecodeError: Expecting value: line 2 column 6

I'm getting below error when i run python script on Ubuntu 16.04. It works fine on Windows when I run the same code but not sure which package is not installed properly. import subprocess import json #one vnet and one subnet in the…
aquib.qureshi
  • 557
  • 1
  • 8
  • 21
0
votes
1 answer

Save Azure CLI command Output using inline script in DevOps

I've been trying to store the output of multiple az cli commands in a variable defined in my pipeline with 0 success. This being my last attempt: The way I try to make sure is getting pass to the var is by doing an echo, which it outputs this(in…
BAcevedo
  • 105
  • 3
  • 12
0
votes
0 answers

How to add a license to the user using Azure CLI

Is it possible to add license to the user using Azure CLI? I am also trying to find whether Azure CLI can be used as a replacement for AzureAD powershell module?
Sreedhar
  • 35
  • 4
0
votes
1 answer

Powershell loop until the output is one line

What i am trying to achieve is that if the output is one line and that that line gets written away in a variable. This is the code i have right now: Connect-AzureRmAccount (get-azurermresourcegroup).ResourceGroupName $filter = Read-Host -Prompt…
Brynn
  • 97
  • 2
  • 13
0
votes
1 answer

Powershell count azure CLI result

I am trying to achieve that my output if it is one single line it gets written away in a variable This is what i have so far az group list --query '[].{name:name}' --output table $filter = Read-Host -Prompt "Please filter to find the correct…
Brynn
  • 97
  • 2
  • 13
0
votes
1 answer

Azure keyvault CLI - how to have a space in the value

I'm using Azure's az CLI to interact with KeyVault and I don't know how to include a space in the value of the secret I'm trying to set. As of azure cli version 2.0.46, proper syntax for setting a secret is: az keyvault secret set --vault-name NAME…
s g
  • 5,289
  • 10
  • 49
  • 82