Getting Started with Azure CLI

What is Azure Command-Line Interface (CLI)

Azure CLI is a set of commands used to manage Azure resources. The advantages to using it are that you can access functionality not available in the portal, and you can automate your work.
You can run commands in all different shells and operating systems, but for this post, I’m going to use PowerShell and Windows 10.

Installing the Azure CLI

You can find the latest MSI distributable here. After the installation, you can log in to your Azure subscription with the az login command.
This will load an Azure sign-in page.

Then you can use az version to check that everything is working as expected.

Some useful commands

  • az configure some defaults configuration
  • az -h help
  • az account list --output table list subscriptions
  • az account show --output table current active subscription (would be used as default subscription)
  • az account set --subscription "My Demos" change the active subscription
  • az account list-locations --output table list locations
  • az find commandtosearch find commands containing commandtosearch in the name
  • az upgrade update your CLI installation

Where to continue

To continue learning about Azure CLI, you can see in this link a list of how to use Azure CLI effectively, or you can use the Additional Resources section below.
I’m also planning some upcoming blog posts right here showing some specific tasks using Azure CLI.

Additional Resources

Picture of Rodrigo Juarez

Rodrigo Juarez

Rodrigo Juarez has over 25 years of experience in software development, specializing in Microsoft technologies. His mission is to solve complex problems for his clients, with a focus on results. He achieves this by applying the appropriate technology and using best practices to ensure the delivery of high-quality solutions. Over the past 6 years, Rodrigo has honed his skills in back-end development and in creating mobile applications, initially using Xamarin and now transitioning to .NET MAUI. He is a Lead Mobile Developer at Trailhead Technology Partners and the co-author, along with Jesse Liberty, of the book ".NET MAUI for C# Developers"

Free Consultation

Sign up for a FREE consultation with one of Trailhead's experts.

"*" indicates required fields

This field is for validation purposes and should be left unchanged.

Related Blog Posts

We hope you’ve found this to be helpful and are walking away with some new, useful insights. If you want to learn more, here are a couple of related articles that others also usually find to be interesting:

Deploying A GPT-4o Model to Azure OpenAI Service

Azure OpenAI Service enables easy deployment of powerful language models like GPT-4o. This guide walks you through the process, from securing access and creating resources in the Azure portal to navigating the updated Azure AI Studio for mo

Read More

Our Gear Is Packed and We're Excited to Explore With You

Ready to come with us? 

Together, we can map your company’s software journey and start down the right trails. If you’re set to take the first step, simply fill out our contact form. We’ll be in touch quickly – and you’ll have a partner who is ready to help your company take the next step on its software journey. 

We can’t wait to hear from you! 

Main Contact

This field is for validation purposes and should be left unchanged.

Together, we can map your company’s tech journey and start down the trails. If you’re set to take the first step, simply fill out the form below. We’ll be in touch – and you’ll have a partner who cares about you and your company. 

We can’t wait to hear from you! 

Thank you for reaching out.

You’ll be getting an email from our team shortly. If you need immediate assistance, please call (616) 371-1037.