Azure CLI Setup
Objective
Install and configure the Azure CLI for managing Azure resources.
Tools & Technologies
Azure CLIaz loginPowerShell
Key Commands
az loginaz account listaz account set --subscription 'My Sub'az group list --output tableLab Steps
01
Install Azure CLI
Install the Azure CLI on Linux/Windows/Mac.
02
Authenticate
Log in with az login and select the correct subscription.
03
Basic Commands
Explore az group, az vm, az network commands.
04
Output Formats
Use --output table, json, tsv for different use cases.
Challenges Encountered
- Browser-based login fails in headless environments — use device code flow
- Multiple subscriptions require explicit account set
Key Takeaways
- Use az configure --defaults for frequently used resource groups
- Service principal login is required for automation