Introduction

Completed

This module teaches you how to use the Azure Command-Line Interface (CLI) to create and manage Azure resources efficiently. The Azure CLI is a cross-platform tool that enables you to execute administrative commands through terminal interfaces, making it ideal for both interactive resource management and automated deployments.

Why Azure CLI matters

Azure CLI provides a consistent, scriptable way to manage Azure resources across Windows, Linux, and macOS platforms. Unlike the Azure portal's graphical interface, Azure CLI enables:

  • Automation at scale: Manage hundreds of resources with scripts instead of manual clicks.
  • Version control: Store infrastructure commands in Git alongside application code.
  • CI/CD integration: Incorporate Azure resource management into DevOps pipelines.
  • Consistency: Execute the same commands across development, staging, and production environments.
  • Flexibility: Work from your local terminal, Azure Cloud Shell, or Docker containers.

Learning objectives

After completing this module, you'll be able to:

  • Understand Azure CLI syntax: Learn the command structure including reference groups, commands, parameters, and values.
  • Install and configure Azure CLI: Set up Azure CLI on Linux, macOS, or Windows and authenticate to your Azure subscription.
  • Create Azure resources interactively: Execute commands at the terminal to create resource groups and storage accounts.
  • Automate with Bash scripts: Write and run scripts that use Azure CLI commands for repetitive tasks.
  • Troubleshoot effectively: Use the --debug parameter and understand scripting language differences to resolve common issues.
  • Work efficiently: Find help using az find, --help, and Azure CLI documentation indexes.

Prerequisites

  • Command-line experience: Familiarity with Bash, PowerShell, or similar terminal interfaces.
  • Azure fundamentals: Basic understanding of Azure concepts including resource groups, storage accounts, and subscriptions.
  • Azure portal experience: Practical experience managing Azure resources through the Azure portal interface.
  • DevOps awareness: General knowledge of automation and infrastructure management practices.