Questions tagged [azure-cli]

The tag has no usage guidance, but it has a tag wiki.

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

Establishing an Azure VPN connection from CLI/PowerShell

I've installed Azure VPN Client app and configured an Azure VPN profile. It works when I manually start it via the app's UI. How do I initiate the connection via command line, Azure CLI or PowerShell? ...
noseratio's user avatar
  • 2,683
0 votes
1 answer
3k views

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&...
ianhalfpenny's user avatar
0 votes
1 answer
1k views

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 ...
user avatar
0 votes
1 answer
373 views

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 -&...
ianhalfpenny's user avatar
1 vote
1 answer
2k views

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 ...
xpt's user avatar
  • 8,551
0 votes
1 answer
353 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 ...
Anonymous Corp's user avatar
0 votes
0 answers
241 views

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/...
beyondtdr's user avatar
  • 101
0 votes
1 answer
792 views

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 ...
user1253539's user avatar
1 vote
2 answers
2k views

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=='...
Lavair's user avatar
  • 123
0 votes
1 answer
89 views

How to Connect Two Azure Virtual Network Gateways in Different Azure Directories

My interpretation of the Microsoft documentation leads me to believe that I can connect two Virtual Network Gateways within two different Azure Directories but it will need to be done via PowerShell. ...
bikerben's user avatar
  • 111
0 votes
1 answer
343 views

Azure Cloud Shell in Windows Terminal App

Once Azure Cloud Drive shell of Windows Terminal, it seems to default to PowerShell. I can switch to Bash by typing Bash. But once inside BASH shell can I switch to PowerShell again? Typing PS or ...
Dee M's user avatar
  • 11
3 votes
0 answers
554 views

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 ...
Mario's user avatar
  • 201
3 votes
1 answer
4k views

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 ...
peidaqi's user avatar
  • 131
1 vote
0 answers
1k views

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 ...
Miroot's user avatar
  • 11
0 votes
1 answer
2k views

deployment failed using AzureDevops

I'm followin this Azure Devops lab: https://azuredevopslabs.com/labs/vstsextend/github-azurepipelines/#task-4-embedding-automated but when I'm deploying the app this error appears: There were ...
Champetaman's user avatar
0 votes
1 answer
332 views

How to setup az library on CentOS Linux release 7.6.1810 (Core)

I am trying to use az library on CentOS Linux release 7.6.1810 (Core), but when I run az --version the following message is shown. [azure@cdh-raw-master ~]$ az --version Traceback (most recent call ...
Lucas Venezian Povoa's user avatar
0 votes
1 answer
130 views

Upload Custom VHD image to Azure Stack Market Place

I've uploaded a VHD image to blob storage and create a image from that and create VM from that successfully. But when creating new VM in Operating System Disk Image my image is not showing. I tried to ...
vish's user avatar
  • 111
0 votes
1 answer
1k views

List the current OS users of Linux VM on Azure Cloud

I want to add the multiple users on my Linux VM on Azure cloud, i could find the instruction on https://docs.microsoft.com/en-us/cli/azure/vm/user?view=azure-cli-latest, however strangely enough there'...
opensourceJunkie's user avatar
1 vote
0 answers
2k views

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's user avatar
  • 8,551
1 vote
1 answer
188 views

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\...
femi's user avatar
  • 121
2 votes
2 answers
402 views

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 ...
Mathias Wrobel's user avatar
0 votes
1 answer
325 views

How to install OSSEC on virtual machine in azure

I want to install Open Source Host based Intrusion Detection System(OSSEC) on virtual machine of Linux Operating system in Azure .There is no proper documentation on How to install OSSEC in Azure. Any ...
Soumya S's user avatar
12 votes
3 answers
23k views

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's user avatar
  • 8,551