Azure CLI Commands - Gary-Moore/AzureDevelopment GitHub Wiki
az login
az login -u <username> -p <password>
az login --service-principal -u <user> -p <password-or-cert> --tenant <tenant>
az set subscription
az vm image list -all <search term> -o table
az vm create \
--resource-group myResourceGroup \
--name myVM \
--image win2016datacenter \
--admin-username azureuser \
--admin-password $AdminPassword \
--size Standard_DS2_v2
--no-wait
az vm show -g myResourceGroup -n myVm -d
az vm open-port \
--port 80 \
--resource-group myResourceGroup \
--name myVM
# Start a CustomScript extension to use a simple bash script to update, download and install WordPress and MySQL
az vm extension set \
--name DSC \
--publisher Microsoft.Powershell \
--version 2.19 \
--vm-name myVM \
--resource-group myResourceGroup \
--settings '{"ModulesURL":"https://github.com/Azure/azure-quickstart-templates/raw/master/dsc-extension-iis-server-windows-vm/ContosoWebsite.ps1.zip", "configurationFunction": "ContosoWebsite.ps1\\ContosoWebsite", "Properties": {"MachineName": "myVM"} }'
az vm deallocate -g MyResourceGroup -n myVM
az storage container create -n myContainerName --public-access off
az storage blob upload -c myContainerName -f fileToUpload -n blobName
az storage blob generate-sas -c myContainerName -n blobName --permissions r --expiry 2017-12-12T12:00Z
az storage queue create -n myQueueName
az storage message put --content "Hello World" -q queueName
az storage message get -q queueName --visiblity-timeOut 60
az storage message delete -q queueName --id messageId --pop-receipt popReceipt