I’d stumbled onto the new shell one day in Azure before the big MS Build announcement but stupidly thought it was just for Linux based stuff or something. It doesn’t even have powershell. Then the MS build announcement came and I learned it’s not just for linux hackers (anyone using nix obviously hacks 😛 ). It’s got Azure CLI and it just so happens that you need Azure CLI to add a PTR record to a public IP address in Azure. Behold, a very short intro into the new Azure Cloud Shell built right into the portal.
- Login to the Azure portal. https://portal.azure.com
- Click on the Cloud Shell icon on the top of the page next to settings and notifications.
- Choose a subscription and click on create storage.
Note: If you receive an error like RequestDisallowedByPolicy check your subscription policies and remove any that require storage encryption. Add them back after.
- Type in az login and follow the instructions. Go to the URL and enter the code, the shell will refresh when done.
- Now type in az account list. This will list out your subscriptions under the user you logged in as.
az account list
- To select a default subscription type in az account set –subscription <Subscription Name>
az account set --subscription "Mike Says Meh"
- Now you’ve got yourself on the right subscription it’s time to do the needful. To add reverse DNS to an existing public IP address you type in the command below.
az network public-ip update --resource-group RgName&nbsp;--name PublicIPName&nbsp;--reverse-fqdn SomeVM.eastus.cloudapp.azure.com
And that’s just one itty bitty part of it. The Azure CLI command reference is here https://docs.microsoft.com/en-us/cli/azure/. Have fun!
Of course I immediately thought about whether or not I could Azure on my phone? Soon …