azure-cli2

Add Graph API via az ad app permission fails

被刻印的时光 ゝ 提交于 2021-02-11 06:16:14
问题 I'm attempting to add the Graph API via CLI 2.x. Here is the PowerShell script I'm running: # # (1) Register the app, replyUrl, enable implicitflow # Write-Host " - Create Application " + $appName az ad app create --display-name "$appName" --reply-urls "$replyUrl" --oauth2-allow-implicit-flow true # # (2) get the app id into a variable # $appId=$(az ad app list --display-name $appName --query [].appId -o tsv) # # (3) API Permissions, add Graph API/Permission (delegated)
 # Write-Host " - Add

Add Graph API via az ad app permission fails

强颜欢笑 提交于 2021-02-11 06:14:59
问题 I'm attempting to add the Graph API via CLI 2.x. Here is the PowerShell script I'm running: # # (1) Register the app, replyUrl, enable implicitflow # Write-Host " - Create Application " + $appName az ad app create --display-name "$appName" --reply-urls "$replyUrl" --oauth2-allow-implicit-flow true # # (2) get the app id into a variable # $appId=$(az ad app list --display-name $appName --query [].appId -o tsv) # # (3) API Permissions, add Graph API/Permission (delegated)
 # Write-Host " - Add

Azure CLI\Powershell How to exclude requirements

谁都会走 提交于 2019-12-13 03:24:26
问题 So as a continuation of my last question This one. i got this code as a anwser but now i wold like how i could exclude some requirements function Test-AdminPassword { [CmdletBinding()] Param( [Parameter(Position = 0, Mandatory=$true)] [string]$Password, [Parameter(Position = 1)] [int]$Requirements = 5 ) $result = 0 # test length between 12 and 24 if ($Password.Length -in 12..24) { $result++ } # test uppercase if (($Password -creplace '[^A-Z]', '').Length -ge 3) { $result++ } # test lowercase

Azure CLI 2: how to provide parameters in az group depeloyment create command?

随声附和 提交于 2019-12-12 04:31:59
问题 I am using Azure CLI 2.0 on a windows machine and i am trying to create a Docker VM using this Microsoft documentation: az group deployment create --resource-group myResourceGroup \ --parameters '{"newStorageAccountName": {"value": "mystorageaccount"}, "adminUsername": {"value": "azureuser"}, "adminPassword": {"value": "P@ssw0rd!"}, "dnsNameForPublicIP": {"value": "mypublicdns"}}' \ --template-uri https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/docker-simple-on

Edit inbound NAT pool in vmss loadbalancer

拜拜、爱过 提交于 2019-12-11 05:09:59
问题 I'm trying to add a NAT pool for port 8172 to an existing loadbalancer via Azure cli. I found what I believe is the correct command: az network lb inbound-nat-pool update --lb-name --name --resource-group [--add] [--backend-port] [--frontend-ip-name] [--frontend-port-range-end] [--frontend-port-range-start] [--protocol {All, Tcp, Udp}] [--remove] [--set] and I suppose I need to use the --add option. But what's next? How do I specify the frontend and backend settings in the add command? 回答1: I

How to run simple custom commands on a Azure VM (win 7,8,10, Server) post deploy?

亡梦爱人 提交于 2019-12-06 13:47:05
问题 I'm looking into how I can run commands remotely on a freshly deployed windows VM in Azure, and have a few basic questions. It seems like the 'Custom Script Extension' is the answer, but according to the documentation, is stated as only applicable for Server operating systems: https://docs.microsoft.com/en-us/azure/virtual-machines/windows/extensions-customscript This is correct I assume? And if so, what about non-server windows OS? Moving on, I have tried using the Custom Script Extension

How to run simple custom commands on a Azure VM (win 7,8,10, Server) post deploy?

本秂侑毒 提交于 2019-12-04 19:54:08
I'm looking into how I can run commands remotely on a freshly deployed windows VM in Azure, and have a few basic questions. It seems like the 'Custom Script Extension' is the answer, but according to the documentation, is stated as only applicable for Server operating systems: https://docs.microsoft.com/en-us/azure/virtual-machines/windows/extensions-customscript This is correct I assume? And if so, what about non-server windows OS? Moving on, I have tried using the Custom Script Extension against a Windows Server 2016 data centre, based on the MS tutorial at: https://docs.microsoft.com/en-us

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