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
82
votes
12 answers

Azure CLI vs Powershell?

Not precisely able to understand the merit of Azure CLI on Windows environment. Is it targetted for the audience who want to manage Azure IAAS from Linux environment? I thought Powershell core is going to be the way for non-Windows admins. Is…
Abhijeet
  • 13,562
  • 26
  • 94
  • 175
61
votes
3 answers

What is Azure Service Principal?

My requirement is simple. I want to login to Azure through my shell script in non-interactive mode, but "az login -u username -p password" command gives the following error: Get Token request returned http error: 400 and server…
BlindSniper
  • 1,731
  • 3
  • 16
  • 30
54
votes
19 answers

Unable to connect to the server: dial tcp [::1]:8080: connectex: No connection could be made because the target machine actively refused it

Am working on Azure Kubernates where we can store Docker Images in Azure. Here am trying to check my kubectl version, then am getting Unable to connect to the server: dial tcp [::1]:8080: connectex: No connection could be made because the target…
Mani
  • 1,228
  • 3
  • 10
  • 28
39
votes
10 answers

Azure CLI in Git Bash

I am trying to use a bash (sh) script on windows to run a test deployment. I am running the script from the gitbash console so that I have a copy of bash, but doing so means that the azure clie is not available (i.e. azure command is not found).…
Pectus Excavatum
  • 3,593
  • 16
  • 47
  • 68
28
votes
5 answers

How to access Azure Keyvault from docker container running locally?

I have a docker image containing an ASP.NET Core app that uses Azure Key vault to access things like connection strings. When I run the image locally, I get this error: Unhandled Exception:…
zola25
  • 1,774
  • 6
  • 24
  • 44
27
votes
3 answers

How can I permanently purge an entire azure keyvault that's been created with soft delete enabled?

When you create an azure keyvault with soft delete enabled that keyvault persists even if you delete it and re-create it from scratch. When soft-delete is enabled, resources marked as deleted resources are retained for a specified period (90 days…
Liam
  • 27,717
  • 28
  • 128
  • 190
24
votes
2 answers

Azure CLI Get Current Subscription details

How do I find the current Azure subscription using Azure CLI. az account list only gives me the list of subscriptions.
kumar
  • 8,207
  • 20
  • 85
  • 176
24
votes
7 answers

How to enable command completion for Azure CLI in zsh?

I've found hints at there being command completion available for bash[1] for the Azure CLI (az command), but I have not found any indication on how to install/enable that for zsh. Anyone know how to do that, if it is possible? I use oh-my-zsh, if…
josteinb
  • 1,892
  • 2
  • 18
  • 32
22
votes
1 answer

How to generate client secret in azure app registration in Azure AD from CLI?

How can I use AZ commands to create client secret the same way I can do it from the portal?
21
votes
7 answers

How to run Azure CLI commands using python?

I want to use Azure CLI to get the list of all the VMs in my resource group. But I want to implement the same using a python script. For example, I will use the following command in Azure CLI to list the VMs in my resource group: " az vm list -g…
21
votes
6 answers

Azure CLI how to check if a resource exists

I'm starting to write a bash script to provision a VM in a new or existing resource group so that we can enforce naming convention and configuration. In a bash script how can I check that a resource already exists so I don't try to create it…
Jeremy
  • 44,950
  • 68
  • 206
  • 332
20
votes
7 answers

Service Principal az cli login failing - NO subscriptions found

Trying to perform an az cli login using a Service Principal and it is throwing an error stating No subscriptions found for . If this is expected, use '--allow-no-subscriptions'. This code has worked fine previously but now…
phydeauxman
  • 1,432
  • 3
  • 26
  • 48
18
votes
4 answers

How to update azure-cli on Windows?

az --version is telling to update my CLI installation without explaining what to do. So what is the az command to install the updates, if there is any? I can't seem to find it anywhere. I've tried looking for answers here:…
Himesh Ravi
  • 193
  • 1
  • 1
  • 9
18
votes
4 answers

How to get public ip address for virtual-machine using Azure CLI command

I want to get public IP address for a specific virtual machine in Azure bash command line, I have used this command so far but it returns network interface information: az vm list-ip-addresses -g dev-rg -n dev-vm returned value: [ { …
Ehsan Zargar Ershadi
  • 24,115
  • 17
  • 65
  • 95
16
votes
4 answers

Where is the list of deployment template schema api versions?

We are authoring Azure Resource Manager templates. We are using the following deployment template schema, because it is the one that we saw in an example. http://schema.management.azure.com/schemas/2014-04-01-preview/deploymentTemplate.json# It is…
Shaun Luttin
  • 133,272
  • 81
  • 405
  • 467
1
2 3
99 100