Questions tagged [azure-cli]

Azure CLI (az) is a command-line tool for deploying and managing resources in the Azure cloud.

22 questions
12
votes
3 answers

Azure CLI to check VM status

Azure CLI allows people to start & stop VMs. However, is there any Azure CLI command that can show the VM status? I.e., whether it is started or being stopped? Thx.
xpt
  • 8,261
  • 38
  • 102
  • 156
3
votes
0 answers

How I can stop a Azure VM without deallocating via Portal

If I work with VMs from Azure CLI, I can start, stop and deallocate my VM. It works like expected. If I use the portal web interface, I see the start function and a stop function. But this stop function works like stop and deallocate. How can I stop…
Mario
  • 201
  • 1
  • 7
2
votes
1 answer

Azure CLI reports missing credentials to access storage service after login

I'm trying to figure out how login works for Azure CLI. I've already logged in with: az login and everything seems to work perfectly, but when I try to run any other commands, e.g.: az storage blob list --container-name my_container it…
peidaqi
  • 121
  • 1
  • 2
2
votes
2 answers

Azure from Powershell, deploying to the wrong subscription

I'm trying to figure out if i deploy something from my powershell, that it is deploying to the wrong subscription which is in no way connected to eachother, except for that i have previously been logged in with it in powershell. I have used az…
1
vote
1 answer

How to successfully Install Azure CLI

I'm having problem installing Azure CLI. I've tried three methods but all failed. The first two are from Install Azure CLI on Windows, I've tried install the Azure CLI using PowerShell, and Download and install the latest release of the Azure CLI…
xpt
  • 8,261
  • 38
  • 102
  • 156
1
vote
2 answers

How do I check if a VM already exists via Azure CLI?

This is a working solution but not very clean: if [ "$(az vm list -d -o table --query "[?name=='VM_NAME']")" == "$(az vm list -d -o table --query "[?name=='ABSURD_NAME_THAT_CERTAINLY_DOES_NOT_EXIST']")" ]; then printf "VM DOES NOT EXIST…
Lavair
  • 123
  • 6
1
vote
0 answers

Azure CLI Login through a Proxy

Ok .. so I'm pretty much lost. Task : execute a successful az login --service-principal -u XXX -p XXX --tenant something.onmicrosoft.com (Or tenant ID) From A server on the Azure Cloud that has no internet , and no service endpoint connection of…
Miroot
  • 11
  • 3
1
vote
0 answers

Azure CLI to list opened ports

Following up on Azure CLI to open ports, now, is there any Azure CLI command that can show/list what the open ports are of a VM? Thanks
xpt
  • 8,261
  • 38
  • 102
  • 156
1
vote
1 answer

Getting an “you must upgrade Azure CLI” error when attempting to run Enterprise Bot Template in Visual Studio 2017 but my Azure CLI is up to date

I’m trying to deploy the Enterprise Bot Template using VS 2017 and I got the following error when running the msbot clone services code in the ReadMe file. C:\Users\xxx\Documents\Visual Studio 2017\Projects\SovereignBot\SovereignBot>msbot clone…
femi
  • 121
  • 3
0
votes
1 answer

Azure ACR Auth Error - "aad access token with sp failed client id must be guid"

Using this guide: https://github.com/Azure/acr/tree/main/docs/preview/quarantine Endpoint to generate Token: GET https://quarantinetest1.azurecr.io/oauth2/token?service=quarantinetest1.azurecr-test.io&scope=repository:helloworld:pull,push I am…
0
votes
1 answer

How to delete all resource groups forcibly without prompt for confirmation using Azure CLI cmdlets?

Tried the below cmdlet to delete all resource groups in particular location: az group list --query "[?location=='westus']".name -o tsv | xargs -otl az group delete -n It is asking me to prompt for every resource group deletion. Also tried adding…
anon
0
votes
1 answer

PowerShell update Azure Service Principals Properties Tags

Using PowerShell to update Service Principals IDs found here on Microsoft Docs: https://docs.microsoft.com/en-us/graph/api/resources/serviceprincipal?view=graph-rest-1.0#properties Service Principal -> Properties -> tags How can I add custom tag to…
ianhalfpenny
  • 21
  • 1
  • 5
0
votes
1 answer

Getting TSV file output excluding 2 resource types from the az resource list in Azure CLI

Kindly concern that I need to get the azure resource list from the azure CLI excluding 2 kinds of resource types and output the file to a TSV file. I was able do this particular operation via PowerShell from the following command. PowerShell Command…
0
votes
0 answers

How to correctly change directory/file rights (with chmod 777)?

I cd to: '/Users/name/.azure/config' Where I execute: sudo chmod -R 777 ./ Then when I try to run: az configure --defaults group=fake-resource-group I get: Permission denied: '/Users/name/.azure/config' It only works if I do: sudo az configure…
beyondtdr
  • 101
  • 1
0
votes
1 answer

Downloading Entire Azure Blob File Storage to a Local HDD

I currently need to download all the files from these 2 file shares within azure blob storage to a local HDD, both file shares in total have 400GB enter image description here Example of where the file structure between both of the shares are just a…
1
2