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
3 answers

How to get the size of an azure storage account in Azure CLI or Bash Script?

I want to retrieve the size of an azure storage account without using the portal (metrics). How can I get the metrics of the storage account through azure CLI or bash script? Is there a way to make this through azure CLI or any bash scripts?
0
votes
1 answer

How to clean up multiple Azure resources with single powershell command or script?

I am trying to clean up the unused resources in my Azure subscription. there are about 80-90 resources in each subscriptions. It is possible to select and search one by one and delete them. Is there anyway to export the resource names and call a "az…
0
votes
1 answer

Unable to extract specific value from Azure Key vault Secret using az keyvault secret show command

I am new to AzureCLI script. I request some guidance here: Please find the secret(masked value) from my Azure key vault. { "**attributes**": { "created": "2021-10-23T04:26:19+00:00", "enabled": true, "id":…
0
votes
1 answer

Role assignment for an outside/foreign group with az cli?

What I'm trying to do is use a foreign/outside AAD Security Group in a Role Assignment. I tried with az cli (because the portal does not give me the option to choose Groups from another Directory): So, I have a resource in Directory # 1 and a…
andrei0809
  • 85
  • 1
  • 6
0
votes
1 answer

Az CLI to configure Azure Function App TLS/SSL "HTTPS Only" Setting

I am trying to use Az Cli to configure an Azure Function TLS/SSL Binding to switch the "HTTPS Only" setting from Off to On, as depicted below. All attempts appear to have failed so far, using either of the below commands. az webapp config set -g…
0
votes
1 answer

Azure API call - az apim update - update customProperties

I am using following az api call command az apim show -n Namexxx -g RGxxx. As an output I am getting below: { "additionalLocations": null, "apiVersionConstraint": { "minApiVersion": null }, "certificates": null, "createdAtUtc":…
tester81
  • 533
  • 2
  • 9
  • 28
0
votes
1 answer

Exclude Properties in Azure CLI Output's JSON

I'm trying to exclude a few properties from Azure's CLI Output. I know I can use --query to filter through the output using its JMESPath. But I want to exclude just one of them, so it doesn't make sense to select all the other using --query. Is…
QuantAC
  • 31
  • 1
  • 9
0
votes
1 answer

Azure: How to install a specific existing site extension using ARM template?

I have an Azure App Service. I want to install the site extension ASP.NET Core Logging Integration programmatically. So far what I have done is this: Install the site extension manually via the Azure browser GUI (Development Tools ->…
Claus Appel
  • 1,015
  • 10
  • 28
0
votes
1 answer

Connecting to Azure Subscription from Azure Pipeline without Service Connection

From Visual Studio Code or Windows Powershell, I can execute the required Az-Cli/Powershell commands and login to my Azure subscriptions without any problem whatsoever. I'm desperate to replicate this in my Azure Pipeline without the use of a…
0
votes
1 answer

Checkin a single file into an Azure Repo using the commandline

I have an existing Azure Repo. What I'd like to do is checkin a single file into the Repo from a local folder, using the commandline. I'm not particularly concerned whether this is achieved using Az Powershell, Az Cli, Git or any other scripting…
hitman126
  • 699
  • 1
  • 12
  • 43
0
votes
1 answer

Unable to query 'principalName' via azure-cli when authenticated as a Service Principal

If I perform az login as myself, I'm able to see the following output: (.venv) supertonic09 % az role assignment list --subscription aa11bb33-cc77-dd88-ee99-0918273645aa --role "Owner" --query '[*].principalName' [ "zeus@test.onmicrosoft.com", …
0
votes
0 answers

Azure cli query Metrics (hostname, CPU, sockets..)

for our subscription I need a table / list with Metrics like hostname, OS, CPU, sockets, cores ..) for virtual or dedicated azure server (about 7 Server) with Database Software. I started with the cli az vm list -d or I take the portal and create…
Oliver
  • 13
  • 5
0
votes
2 answers

Azure App Service and App gateway SSL certificates informations

in my company I have an Azure environment in which SSL certificates need to be renewed. But I was given no info about them. So I have app services that run in an ASE, with an app Gateway. The certificate for the ASE is handled, I'm trying to gather…
0
votes
3 answers

Azure Pipelines - Equivalent Az DevOps Commands Required

I have successfully used the below commands to update our Azure DevOps project wiki in Powershell ISE. $etagVar = (az devops wiki page show --org https://dev.azure.com/[MyOrg] --project [MyProjectName] --path '/MyWiki/HelloWorld' --wiki…
0
votes
1 answer

Retrieve REST API Response Header Value for Powershell Script

I am creating some Azure CLI script to update an Azure DevOps project wiki, using the following command: az devops wiki page update However, the above command requires a --version (ETag) parameter which appears cannot be obtained via an Azure CLI…
hitman126
  • 699
  • 1
  • 12
  • 43