Azure Fundamentals

Lesson 2 of 6

Resource Groups and the Azure CLI

The Azure CLI (az) lets you create and manage resources from the command line, scriptable and repeatable, unlike clicking through the Portal.

az login

az group create --name kodstigen-rg --location westeurope

az group list --output table

az group delete --name kodstigen-rg

Reading the commands

  • az login opens a browser to authenticate the CLI with your Azure account.
  • az group create makes a new resource group in a chosen region (--location).
  • --output table formats results as a readable table instead of raw JSON, useful while exploring.
  • az group delete removes the resource group and everything inside it, a fast way to clean up when you're done experimenting.

WARNING

Deleting a resource group deletes every resource inside it permanently. It's convenient for cleanup, but double-check the name before you run it.

📝 Azure CLI Quiz

Passing score: 70%
  1. 1.Which command authenticates the Azure CLI with your account?

  2. 2.az group create uses the ____ flag to pick which region the resource group lives in.

  3. 3.Deleting a resource group only deletes the group itself, leaving the resources inside it untouched.