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

How to create multiple storage replication policy through az cli

I am writing a script to set up object replication between my Aaure storage containers. I have over 50 containers in a storage account. First I created a replication policy with below command, first_container=$(head -1 container_list.txt) az storage…
Hound
  • 837
  • 17
  • 31
0
votes
0 answers

How I can view Raw Data (Binary sensor data) which i have published to Azure IoT Hub?

I am implementing custom device based on ESP32 Wi-Fi Microcontroller. I was able to successfully connect this device to Azure IoT Hub.When I transfer telemetry data in json format and I can view the data using azure cli (az iot hub monitor-events…
dilan
  • 1
  • 1
0
votes
2 answers

Create Insights Log query from Azure cli not Log Monitor saved search

Using latest azure cli (2.28.1) The creation of Kusto queries against Log Analytics with the azure cli is documented here: https://learn.microsoft.com/en-us/cli/azure/monitor/log-analytics/workspace/saved-search?view=azure-cli-latest using the…
0
votes
1 answer

How to handle error response from AZ REST

How can I catch and handle error responses from Azure CLI az rest command? If I paste the following into my console (Powershell 7.1 running on Windows), I see some error text written to the console, but it doesn't actually throw which would enter…
ubienewbie
  • 1,771
  • 17
  • 31
0
votes
1 answer

Azure webapp log tail fail parsing

I would like to parse my JSON log with jq, but my command didn't work anymore since few months. I use tail from azure-cli command to show live log from my webapp az webapp log tail --resource-group ${RESOURCE} --name ${appNAME} | sed 's/^[^{]*//g' |…
Vincent Vost
  • 11
  • 1
  • 4
0
votes
1 answer

How can I have multiple Azure user info on a single server?

I'm developing an API that calls subscription and tenant information when a user logs in to azure through azure-cli. When a user logs in to CSP(internally, CSP login is performed using az login --use-device-code), the user receives the url…
0
votes
1 answer

How do I use Azure CLI and PowerShell to retrieve a single specific Function Host Key?

I have a script that creates a Function App and creates a new Host Key. I then started trying to find out how I could get just that new Azure generated key out and into a PowerShell variable. Although the az functionapp keys list command brings back…
NER1808
  • 1,829
  • 2
  • 33
  • 45
0
votes
2 answers

AZ CLI- list devops users

I am trying to list all the users in a devops organization using below command. az devops user list --org https://dev.azure.com/**orgname** --query '[].{user.licenseDisplayName}' , however this doesnt provide correct output. Since this has multiple…
Thahif
  • 5
  • 2
0
votes
1 answer

Azure Resource tag change history/Restore deleted tags

We have an azure environment with multiple vms with a number of tags. A process ran overnight that replaced all the tags with another new tag(both key and value). I would like to recover the old tags. I am aware that the application change analysis…
user1197981
  • 133
  • 3
  • 8
0
votes
3 answers

Retrieve key vault secret into a variable using azure cli task

I am trying to retrieve a password from key vault secret into a variable in an azure CLI task. But it is not populating any value. Please find below the YAML task: - task: AzureCLI@2 displayName: Retrieve and store key vault secret inputs: …
0
votes
1 answer

Working with resource IDs containing hash in Azure CLI

When inspecting certificate resources during a cleanup preparation, I came across several ones whose resource ID contains a hash character (#). When I tried getting their details, Azure CLI failed. az resource show --subscription $subs --ids ` …
Palec
  • 12,743
  • 8
  • 69
  • 138
0
votes
1 answer

How to use AZ Cli or Bash inside Azure Function App?

Is it possible to call AZ Cli / Bash inside an Azure Function App? My goal is to automatically shut down an ADX Cluster after office times as you can save costs by this. Would be nice to call something like that where the authentification method is…
0
votes
0 answers

Issue with passing arguments to Powershell Inline script in Yaml Pipeline

I am very confused with how to pass arguments to inline script (Powershell task or Azure Cli task) in yaml pipeline. Can somebody explain in simple language with a simple example? I have seen so many articles about passing arguments to Powershell…
Anil
  • 1
  • 1
  • 6
0
votes
1 answer

Azure CLI Passing Value To Other Azure Command

Was wondering if there's a way to chain az cli command together and how they should work? For example, I am trying to pipe one az storage account command output into another Also the az storage account list command can return multiple values az…
YTKColumba
  • 25
  • 1
  • 8
0
votes
1 answer

azure CLI `func new` gives error `Value cannot be null. (Parameter 'value')`

The Azure CLI command func new kept producing the same error: One or more errors occurred. (Value cannot be null. (Parameter 'value')) What causes this and how to fix it?
J Asgarov
  • 2,526
  • 1
  • 8
  • 18