This is an old revision of the document!


Azure CLI

Powershell

Login (via GUI prompt)

$AzCred = Get-Credential -UserName <username>
az login -u $AzCred.UserName -p $AzCred.GetNetworkCredential().Password

Login from command line

$key = “HKLM:\SOFTWARE\Microsoft\PowerShell\1\ShellIds”
Set-ItemProperty $key ConsolePrompting True
Get-Credential
Set-ItemProperty $key ConsolePrompting False

Bash

Login

read -sp "Azure user: " AZ_USER && read -sp "Azure password: " AZ_PASS && echo && az login -u $AZ_USER -p $AZ_PASS
  • azure/qnd/azure_cli.1654800717.txt.gz
  • Last modified: 2022/06/09 18:51
  • by mgupton