azure-cli

Error: We don't have a valid access azure with Azure CLI

我的梦境 提交于 2019-12-06 20:29:26
问题 I'm a newer user of Azure CLI. So, i started to used it yesterday. Everything was ok until I received a message on the console that I need to login again, using the command Azure login. I did that the message say. Open my browser and enter the code. The browser load the page that every things it's ok. But, when i go to the console window I receive these message: error: We don't have a valid access token. Please run "azure login" again. info: Error information has been recorded to C:\Users

How do I run Azure Cli Script using my local Azure Cli installation

江枫思渺然 提交于 2019-12-05 11:07:19
First off I feel crazy asking this, sorry if this is a really stupid question. It must be obvious as I have searched everywhere and cannot find an answer! How I am supposed to run this Azure script to create an Azure Function App? https://docs.microsoft.com/en-us/azure/azure-functions/scripts/functions-cli-create-serverless #!/bin/bash # Function app and storage account names must be unique. storageName=mystorageaccount$RANDOM functionAppName=myserverlessfunc$RANDOM # Create a resource group. az group create --name myResourceGroup --location westeurope # Create an Azure storage account in the

Create SQL Server via Azure Resource Manager (ARM) template

会有一股神秘感。 提交于 2019-12-05 10:34:13
I am trying to create a new Azure instance of SQL Server in which I would like to then create a few new databases. I know from the Azure Portal that some sort of admin users could be: an SA user (I think this means "Server Admin" and it looks like some sort of old way of managing a SQL Server instance, but at the same time very "basic" and proved to work) an Active Directory user (not sure about Azure terminology here, but it looks like this could be some "broad user" for the whole Azure platform, like e.g. my own login user for the Azure Portal, this is not specific to databases world). I

Azure CLI commands not working inside azure function apps (portal)

China☆狼群 提交于 2019-12-04 06:30:12
问题 I have powershell scripts which is running locally.But those scripts not running insite function apps > powershell (windows) machine. az login --service-principal -u $ServicePrincipalId -p $ServicePrincipalPass --tenant $ServicePrincipalTenant Getting below when i run the script ERROR: The term 'az' is not recognized as the name of a cmdlet, function, script file, or operable program. since i dont have az cli installed in the windows machine, i have added below line to install az command in

Azure-CLI/Powershell Password requirments

安稳与你 提交于 2019-12-04 02:25:38
问题 So i am trying to make a variable match the password requirements for making a virtual machine in azure CLI to do this it must have 3 of the following !uppercase, 1 lowercase 1 special character or a number This is the main code i am trying to change $AdminPassword = Read-Host -Prompt "Please insert a Admin Password (Password must have 3 of the following: 1 lower case character, 1 upper case character, 1 number and 1 special character)" This is the code i changed but isn't working correctly

Azure CLI commands not working inside azure function apps (portal)

。_饼干妹妹 提交于 2019-12-02 10:13:22
I have powershell scripts which is running locally.But those scripts not running insite function apps > powershell (windows) machine. az login --service-principal -u $ServicePrincipalId -p $ServicePrincipalPass --tenant $ServicePrincipalTenant Getting below when i run the script ERROR: The term 'az' is not recognized as the name of a cmdlet, function, script file, or operable program. since i dont have az cli installed in the windows machine, i have added below line to install az command in my script. Install-Module -Name Az -AllowClobber -Scope CurrentUser Getting access issue while

Azure AD add keys via Azure CLI

♀尐吖头ヾ 提交于 2019-12-01 16:05:52
I'm trying to add a key in my Azure AD application using Azure CLI. But looking throught the Azure CLI API it seems that there is no such command. For exmaple: I'm trying to automate the task from the link below via Azure CLI: http://blog.davidebbo.com/2014/12/azure-service-principal.html I can create AD application, service principal, but I can't find a way to add key for newly create AD application. I'll appreciate any ideas and directions :) Thanks in advance ! For a new AD application, you can specify a key with -p while creating. For example, azure ad app create -n <your application name>

Azure AD add keys via Azure CLI

这一生的挚爱 提交于 2019-12-01 15:05:51
问题 I'm trying to add a key in my Azure AD application using Azure CLI. But looking throught the Azure CLI API it seems that there is no such command. For exmaple: I'm trying to automate the task from the link below via Azure CLI: http://blog.davidebbo.com/2014/12/azure-service-principal.html I can create AD application, service principal, but I can't find a way to add key for newly create AD application. I'll appreciate any ideas and directions :) Thanks in advance ! 回答1: For a new AD

Azure-CLI/Powershell Password requirments

时光怂恿深爱的人放手 提交于 2019-12-01 14:22:58
So i am trying to make a variable match the password requirements for making a virtual machine in azure CLI to do this it must have 3 of the following !uppercase, 1 lowercase 1 special character or a number This is the main code i am trying to change $AdminPassword = Read-Host -Prompt "Please insert a Admin Password (Password must have 3 of the following: 1 lower case character, 1 upper case character, 1 number and 1 special character)" This is the code i changed but isn't working correctly do { $AdminPassword = Read-Host -Prompt "Please insert a Admin Password (Password must have the 3 of the

How to run Azure CLI commands using python?

无人久伴 提交于 2019-12-01 06:44:35
I want to use Azure CLI to get the list of all the VMs in my resource group. But I want to implement the same using a python script. For example, I will use the following command in Azure CLI to list the VMs in my resource group: " az vm list -g MyResourceGroup " But, I want the python script to do the same, where I just have to incorporate the CLI command in the python program. How to run Azure CLI commands using python? According to this file . we could invoke the Azure CLI with following way: from azure.cli.core import get_default_cli get_default_cli().invoke(['vm', 'list', '-g', 'groupname