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.

Filter by
Sorted by
Tagged with
1 vote
1 answer
21 views

How to list all function apps and it's storage account

Is there anyway to combine both commands below where it lists all the function app together with the storage account used for it? This command gets all the function app in the subscription az ...
user avatar
0 votes
0 answers
47 views

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 ...
user avatar
0 votes
0 answers
34 views

Create an Azure Internal Loadbalancer with Zone Redundant Properies

This is the command that I tried to use and the error message received is shown below the command az network lb create --name <name> -g <RG name> --frotnend-ip-name <frontend_name> --...
user avatar
0 votes
0 answers
31 views

Unable to resolve Shared Gallery images shared with me by publisher despite their visibility in the UI

I am unable to find images shared with me via a Shared Image gallery. The issue is present with both the Az cmdlets and the Az CLI, though for consistency I will stick with PowerShell examples here. ...
user avatar
  • 548
0 votes
1 answer
55 views

What is the default RBAC scope used when assigning a role in Azure with the CLI?

This is the documentation for the az role assignment create command: https://docs.microsoft.com/en-us/cli/azure/role/assignment?view=azure-cli-latest#az-role-assignment-create --score is an optional ...
user avatar
  • 109
2 votes
1 answer
93 views

Azure run command for Fortinet virtual machine with serial console?

I'm trying to execute with Azure a .conf file that has some command lines that are executable into the Fortinet's serial console in a virtual machine with FortiOS v6.4.3 (Linux based system). I use AZ ...
user avatar
1 vote
0 answers
21 views

When remediation for policy is activated in Azure?

We create a virtual machine that needs 2 extensions, for that we define and assign 2 customs policies, also we create and activate remediation task to make sure that all virtual machines (new ad old ...
user avatar
0 votes
1 answer
2k views

How to list all expired service principal credentials in Azure active directory

I recently had an issue that turned out to be caused by an expired service principal credential. I would like to have a simple way to get a list of all the expiration dates/expired sp credentials to ...
user avatar
  • 101
0 votes
1 answer
364 views

Can't create a NIC using Azure CLI (BadRequestError)

Consider the following scenario: One resource-group called rg-foo which was created in the location switzerlandnorth One virtual network called vnet-switzerland-north holding one subnet called ...
user avatar
1 vote
1 answer
2k views

How can I use AZ CLI to find Azure resources which are missing a specific tag?

I need to assure that all our resource groups have a specific tag. I know I can use a policy to ensure that any created resource will have the tag, but for existing resources I'm trying to come up ...
user avatar
  • 137
1 vote
1 answer
240 views

Azure AD - App Registration - Creating a new scope

I'm looking for a way to create a new Azure Active Directory application registration via a PowerShell script. I can create the application using the following script: $appName = "CliApp" az ad app ...
user avatar
  • 131
0 votes
1 answer
341 views

Azure CLI list Azure SQL Server DB backups

I'm trying to make an automated script that restores from the latest LTR backup of an Azure SQL server database. Using this command: az sql db restore --dest-name $newdbname --name $dbname--resource-...
user avatar
  • 101
0 votes
1 answer
366 views

When using web browser login with the az cli, Getting that users Object Id

I want to provision an azure key vault from terraform via the interactive powershell prompt. I want to login to to azure (az login) with the web browser. I want that users object id to set a limited ...
user avatar
1 vote
1 answer
442 views

Can we download Azure deployment files with Azure CLI?

Is it possible to download the deployment JSON file (the template) for an Azure resource using Azure CLI? The equivalent in PowerShell seems to be this command. https://docs.microsoft.com/en-us/...
user avatar
1 vote
1 answer
55 views

Not able to configure azure cli on window 2003 server

Can anyone help me on this, I am trying to install and configure azure powershell on my window 2003 aws ec2 instance. But i am getting error like it is not a valid win32 application.
user avatar
3 votes
2 answers
6k views

Docker push to Azure container registry fails because authentication expires before it finishes - workaround?

Using the Azure CLI on Windows Server 2016 against an Azure container registry (az login and az acr login) I'm pushing a large Windows container docker image (>10GB) with docker push. It seems the ...
user avatar
0 votes
2 answers
1k views

Azure tags: search for value including wildcard

We'd like to have multi-valued tags. For example, for the tag "application", we have some resources that involve several applications, i.e. Virtual Machines running several JBoss instances for ...
user avatar
1 vote
3 answers
13k views

Can not find kubectl executable in PATH

Azure Kubernetes Service created and now to open Kubernetes dashboard, following the steps and getting error: az : ERROR: Can not find kubectl executable in PATH). PS C:\Program Files (x86)> az ...
user avatar
0 votes
1 answer
1k views

Azure cli not creating role

I am trying to follow this guide and am having no luck on the az ad sp create-for-rbac --role="Contributor" --scopes="/subscriptions/${SUBSCRIPTION_ID}" step. It gives me the error below. I have tried ...
user avatar
2 votes
1 answer
890 views

Registration of Azure Resource Provider hangs indefinitely

I'm just starting to look into Azure and AKS. In order to do this, I have to enable a bunch of resource providers. I did this using the Azure CLI, like so: az provider register -n Microsoft.Network ...
user avatar
1 vote
0 answers
3k views

Azure Create VM from existing managed disk: 'Creating a virtual machine from Marketplace image requires Plan information in the request.'

Following some instructions to migrate a VM from one vnet to another, these particular instructions said to delete the VM keeping the OS drive and the launch a VM from the disk. The original VM was ...
user avatar
  • 31
2 votes
1 answer
628 views

azure CLI 2.0 az webapp log tail cannot find the 'NAME' of my webapp

When i was using the Azure CLI 1.0, i use the following command to log tail my webapp: azure login azure site log tail MY_WEBAPP_NAME Now after i have switched to Azure CLI 2.0, i cannot find the ...
user avatar
  • 201